SELFPHP: Version 5.8.2 Befehlsreferenz - Tutorial – Kochbuch – Forum für PHP Einsteiger und professionelle Entwickler

SELFPHP


Professional CronJob-Service

Suche



CronJob-Service    
bei SELFPHP mit ...



 + minütlichen Aufrufen
 + eigenem Crontab Eintrag
 + unbegrenzten CronJobs
 + Statistiken
 + Beispielaufrufen
 + Control-Bereich

Führen Sie mit den CronJobs von SELFPHP zeitgesteuert Programme auf Ihrem Server aus. Weitere Infos



:: Buchempfehlung ::

TYPO3 Kochbuch

TYPO3 Kochbuch zur Buchempfehlung
 

:: Anbieterverzeichnis ::

Globale Branchen

Informieren Sie sich über ausgewählte Unternehmen im Anbieterverzeichnis von SELFPHP  

 

:: Newsletter ::

Abonnieren Sie hier den kostenlosen SELFPHP Newsletter!

Vorname: 
Name:
E-Mail:
 
 

Zurück   PHP Forum > SELFPHP > HTML, CSS und JavaScript Help!

HTML, CSS und JavaScript Help! Hier gibt es Hilfe zu HTML, CSS und JavaScript Problemen

Antwort
 
Themen-Optionen Ansicht
  #1  
Alt 12.11.2014, 18:23:50
hoseonline hoseonline ist offline
Anfänger
 
Registriert seit: Jan 2014
Alter: 38
Beiträge: 5
Javascript läuft nicht - nur warum?

Hi,

ich habe ein einfaches Javascript, welches über einen Button prüft was in einem Formular ausgewählt wurde.

Hier das Javascript:
Code:
 <script type="text/javascript">
                
                    <?php //Funktion bei mouseover ?>
                    function checkForm1()
                    {
                        if(document.Formular.customPrice06){
                    if(document.Formular.customPrice06.value=="custom_value")
                    {
                    document.all.image.style.display = "block";
                                }}
                        
                        if(document.Formular.customPrice012){
                    if(document.Formular.customPrice012.value=="custom_value")
                    {
                    document.all.image.style.display = "block";
                                }}		
                                
                            if(document.Formular.customPrice010){
                    if(document.Formular.customPrice012.value=="custom_value")
                    {
                    document.all.image.style.display = "block";
                                }}		
                                
                            if(document.Formular.customPrice09){
                    if(document.Formular.customPrice012.value=="custom_value")
                    {
                    document.all.image.style.display = "block";
                                }}		
                                
                    }
                    
                    
                    <?php //Funktion bei mouseout ?>
                    function checkForm2()
                    {
                        if(document.Formular.customPrice06){
                    if(document.Formular.customPrice06.value=="custom_value")
                    {
                    document.all.image.style.display = "none";
                                }}
                                
                                if(document.Formular.customPrice012){
                    if(document.Formular.customPrice012.value=="custom_value")
                    {
                    document.all.image.style.display = "none";
                                }}
                                
                                if(document.Formular.customPrice010){
                    if(document.Formular.customPrice010.value=="custom_value")
                    {
                    document.all.image.style.display = "none";
                                }}
                                
                                if(document.Formular.customPrice09){
                    if(document.Formular.customPrice09.value=="custom_value")
                    {
                    document.all.image.style.display = "none";
                                }}
                                
                    }
                    
                    
                    <?php //Funktion bei mouseclick ?>
                    function checkForm()
                    {
                        
                            if(document.Formular.customPrice06){
                    if(document.Formular.customPrice06.value=="custom_value")
                    {
                    alert ("Bitte wählen Sie Größe/Länge aus");
                    return false;
                                }}
                            if(document.Formular.customPrice012){
                     if(document.Formular.customPrice012.value=="custom_value")
                    {
                    alert ("Bitte wählen Sie eine Größe aus");
                    return false;
                                }}
                            if(document.Formular.customPrice010){
                    if(document.Formular.customPrice010.value=="custom_value")
                    {
                    alert ("Bitte wählen Sie eine Farbe aus");
                    return false;
                                }}
                            if(document.Formular.customPrice09){
                    if(document.Formular.customPrice09.value=="custom_value")
                    {
                    alert ("Bitte wählen Sie die Länge aus");
                    return false;
                                }}
                                
                            return true;
                    }	
                        
            </script>
HIer das Formular:

HTML-Code:
<form name="Formular" method="post" class="product" action="index.php">
<span class="addtocart-button">
				<input type="submit" name="addtocart"  class="addtocart-button" value="<?php echo $button_lbl ?>" title="<?php echo $button_lbl ?>" onmousedown="return checkForm( );" onmouseover="return checkForm1( );" onmouseout="return checkForm2( );" />
			</span>
</form>

<img id="image" class="waehlen" src="/waehlen.png" alt="" style="display:none;" >
Seitenquellcode:

HTML-Code:
<form class="product" action="index.php" method="post" name="Formular">
<div class="product-fields">
<div class="product-field-type-V" style="display:inline-block;">
<span class="product-fields-title">Größe/Länge</span>
<span class="product-field-display">
<select id="customPrice06" name="customPrice[0][6]">
<option value="custom_value">Bitte wählen</option>
<option value="32869">36/34 </option>
<option value="32867">38/30 </option>
...
Ich habe das Ganze auch auf der Produktseite laufen, da funktioniert ist. Sobald beim Dropdown "Bitte wählen" in den Warenkorb gelegt werden soll, gibt es eine Meldung, das über mouseover und down.
Verstehe nicht, warum das auf dem Wunschzettel nicht funktioniert.
Fehlermeldung im Chrome: Uncaught ReferenceError: checkForm1 is not defined

Jemand eine Idee?
Mit Zitat antworten
Antwort


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind aus.
[IMG] Code ist aus.
HTML-Code ist aus.

Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Php übergibt String als Parameter an Javascript master_knolle HTML, CSS und JavaScript Help! 2 12.10.2011 16:31:02
in button.php javascript einbinden ZyRoBoT PHP Entwicklung und Softwaredesign 8 18.03.2009 20:49:51
überprüfen ob javascript und cookies aktiviert sind Socrates PHP Grundlagen 1 22.02.2007 18:48:56
Mit Javascript Formulare kontrollieren cubichead Off Topic Area 4 14.09.2003 15:03:03
PHP conetcten mit Javascript swishy PHP für Fortgeschrittene und Experten 6 14.09.2002 13:51:11


Alle Zeitangaben in WEZ +2. Es ist jetzt 12:14:30 Uhr.


Powered by vBulletin® Version 3.8.3 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.


© 2001-2024 E-Mail SELFPHP OHG, info@selfphp.deImpressumKontakt