pragmaMx Support Forum pragmaMx Support Forum

[gelöst] Java Script Problem Standard Theme

0 Mitglieder und 1 Gast betrachten dieses Thema.

Webfan

[gelöst] Java Script Problem Standard Theme
« am: 01 April 2012, 20:17:52 »
Hallo  :bye:
bei der Arbeit an einem Restaurantbewertungsmodul für bambussprosse tut sich folgender Fehler auf, den ich derzeit nicht zu beheben weiß:
- Meine Java Scripts funktionieren auf der Testseite, nicht aber auf der Kundenseite.
Beide Seiten haben das Standard Theme installiert.
- funktioniert => http://outshop.de/Lokale-op-v-t-testlokalssdgdsg-id-1.html
- funktioniert nicht => http://schmeckts.at/Lokale-op-v-t-cafeeinstein-id-1.html
Also, wie gesagt es funktioniert eigentlich bisher alles es sind die Java Scripts die nicht funktionieren.
Und JS technisch bin ich nicht so der Meister  :red:
Für hilfreiche Antworten vielen Dank!

( [ Ich möchte dieses Lokal bewerten ] oder [ Bilder hochladen ] klicken ist was nicht geht )

mfg
 :bye:

Auszug aus modules/Lokale/templates/viewEntry.html:
<script type="text/javascript">
//<![CDATA[

 function toggleDiv3(divid){
    if(document.getElementById(divid).style.display == 'none'){
      document.getElementById(divid).style.display = 'block';
    }else{
      document.getElementById(divid).style.display = 'none';
    }
  }



function TSelectRatingSpeisen()
{
 if(document.form1.rating_speisen[document.form1.rating_speisen.selectedIndex].value=='10')
  {
   document.getElementById("CC_speisen").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }

   if(document.form1.rating_speisen[document.form1.rating_speisen.selectedIndex].value=='8')
  {
   document.getElementById("CC_speisen").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }


 if(document.form1.rating_speisen[document.form1.rating_speisen.selectedIndex].value=='6')
  {
   document.getElementById("CC_speisen").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }

 if(document.form1.rating_speisen[document.form1.rating_speisen.selectedIndex].value=='3')
  {
   document.getElementById("CC_speisen").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }

 if(document.form1.rating_speisen[document.form1.rating_speisen.selectedIndex].value=='1')
  {
   document.getElementById("CC_speisen").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }

 if(document.form1.rating_speisen[document.form1.rating_speisen.selectedIndex].value=='-5')
  {
   document.getElementById("CC_speisen").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }
}



function TSelectRatingAmbiente()
{
 if(document.form1.rating_ambiente[document.form1.rating_ambiente.selectedIndex].value=='10')
  {
   document.getElementById("CC_ambiente").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }

   if(document.form1.rating_ambiente[document.form1.rating_ambiente.selectedIndex].value=='8')
  {
   document.getElementById("CC_ambiente").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }


 if(document.form1.rating_ambiente[document.form1.rating_ambiente.selectedIndex].value=='6')
  {
   document.getElementById("CC_ambiente").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }

 if(document.form1.rating_ambiente[document.form1.rating_ambiente.selectedIndex].value=='3')
  {
   document.getElementById("CC_ambiente").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }

 if(document.form1.rating_ambiente[document.form1.rating_ambiente.selectedIndex].value=='1')
  {
   document.getElementById("CC_ambiente").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }

 if(document.form1.rating_ambiente[document.form1.rating_ambiente.selectedIndex].value=='-5')
  {
   document.getElementById("CC_ambiente").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }
}




function TSelectRatingService()
{
 if(document.form1.rating_service[document.form1.rating_service.selectedIndex].value=='10')
  {
   document.getElementById("CC_service").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }

   if(document.form1.rating_service[document.form1.rating_service.selectedIndex].value=='8')
  {
   document.getElementById("CC_service").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }


 if(document.form1.rating_service[document.form1.rating_service.selectedIndex].value=='6')
  {
   document.getElementById("CC_service").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }

 if(document.form1.rating_service[document.form1.rating_service.selectedIndex].value=='3')
  {
   document.getElementById("CC_service").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }

 if(document.form1.rating_service[document.form1.rating_service.selectedIndex].value=='1')
  {
   document.getElementById("CC_service").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'><img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }

 if(document.form1.rating_service[document.form1.rating_service.selectedIndex].value=='-5')
  {
   document.getElementById("CC_service").innerHTML="<img src='modules/<?php echo $this->module_name?>/images/redstar.jpg' border='0'>";
  }
}


//]]>
</script>



<hr noshade />




<center>
[ <a href="javascript:;" onmousedown="toggleDiv3('CC_ratingformular');"><?php echo _LOKLANG_IWANTRATELOKAL_;  ?></a> ]
</center>

<center>
<table border="0" width="100%">
<tr>
<td width="100%" valign="top">
<div id="CC_ratingformular" style="display:none;">
<h1><?php echo _LOKLANG_RATETHISLOKAL_?></h1>
<form name="form1" action="modules.php?name=<?php echo $this->module_name?>&op=rating&id=<?php echo $this->data['id']; ?>" method="post" enctype="multipart/form-data">
<?php
echo _LOKLANG_SPEISEN_;
?>

<select name="rating_speisen" onchange="TSelectRatingSpeisen();" onclick="TSelectRatingSpeisen();">
<option value="10">hervorragend</option>
<option value="8">ausgezeichnet</option>
<option value="6">sehr gut</option>
<option value="3">gut</option>
<option value="1">noch gut</option>
<option value="-5">schlecht</option>
</select>
<div id="CC_speisen">

</div>
<br />

<?php
echo _LOKLANG_AMBIENTE_;
?>

<select name="rating_ambiente" onchange="TSelectRatingAmbiente();" onclick="TSelectRatingAmbiente();">
<option value="10">hervorragend</option>
<option value="8">ausgezeichnet</option>
<option value="6">sehr gut</option>
<option value="3">gut</option>
<option value="1">noch gut</option>
<option value="-5">schlecht</option>
</select>
<div id="CC_ambiente">

</div>
<br />


<?php
echo _LOKLANG_SERVICE_;
?>

<select name="rating_service" onchange="TSelectRatingService();" onclick="TSelectRatingService();">
<option value="10">hervorragend</option>
<option value="8">ausgezeichnet</option>
<option value="6">sehr gut</option>
<option value="3">gut</option>
<option value="1">noch gut</option>
<option value="-5">schlecht</option>
</select>
<div id="CC_service">

</div>
<br />

<?php
echo _LOKLANG_PREISLAGE_;
?>

<select name="preislage" onchange="TSelectPreislage();" onclick="TSelectPreislage();">
<option value="1">sehr teuer</option>
<option value="2">teuer</option>
<option value="3">mittel</option>
<option value="4">günsitg</option>
<option value="5">sehr günstig</option>
</select>
<div id="CC_preislage">

</div>

<br />
<?php echo _LOKLANG_COMMENT_?>:<br />
<?php

$sw 
= new SPAW_Wysiwyg('comment'''_DOC_LANGUAGE11'100%''450');
echo 
$sw->getHtml();
?>

<br />
<br />

<input type="submit" name="BTN_rating" value="<?php echo _LOKLANG_RATENOW_?>">
<br />
<br />
<a href="javascript:;" onmousedown="toggleDiv3('CC_pictures');"><?php echo _LOKLANG_ADDPICS_;  ?></a>

<div id="CC_pictures" style="display:none;">
<table border="0" width="100%">


<?php

for($i 1$i <= $GLOBALS['LOK_max_pics']; $i++)
{
?>

<tr>
<td width="50%">
<?php
echo _LOKLANG_BILD_' '.$i.' (jpg!)';
?>

</td>
<td width="50%">
<input type="file" name="picture_<?php echo $i?>">
</td>
</tr>




<tr>
<td width="50%">
<?php
echo _LOKLANG_BILDBESCHREIBUNG_.' ('.$i.')';
?>

</td>
<td width="50%">
<?php
$sw 
= new SPAW_Wysiwyg('bildbeschreibung_'.$i''_DOC_LANGUAGE11'50%''100');
echo 
$sw->getHtml();
?>

</td>
</tr>

<?php
}

?>


</table>
</div>

<br />
<br />
<input type="submit" name="BTN_rating" value="<?php echo _LOKLANG_RATENOW_?>">
<br />
<br />

</form>

</div>
</td>
</tr>
</table>
</center>

Webfan

Re:Java Script Problem Standard Theme
« Antwort #1 am: 01 April 2012, 21:30:04 »
Alles klar, pmxHeader benutzen und schon funktionierts  :JC_highfive:
http://www.pragmamx.org/doku.php?do=search&id=pmxHeader
mfg