javascript doesnt work in IE

  • jutt512
  • Born
  • Born
  • jutt512
  • Posts: 1

Post 3+ Months Ago

Hi guys,
I am quite new to the javascript. I have the following java script which should allow me to open a submenu. The scenario is that i trigger two events at the same time. One is when i click on the menu it should open a submenu and along with it, it also opens a new page. and i have a javascript which sets a cookie so if a menu is open and i go to another menu, then the previous menu remain open when i come back to it later. i am not sure what to do because it works fine in firefox and in the rest of the browsers like firefox but with IE it doesnt. please help me if you guys could. you could check this on the website which i am working on at http://www.gecoc.de. there you can see on the left hand side there are few menus.

This is a function to set a cookie

function getCookie(name){
var i = 0;
var suche = name + "=";
while(i<document.cookie.length){
if(document.cookie.substring(i, i + suche.length) == suche){
var ende = document.cookie.indexOf(";", i + suche.length);
ende = (ende > -1) ? ende: document.cookie.length;
var inhalt = document.cookie.substring(i + suche.length, ende);
return unescape(inhalt);
}
i++;
}
return "";
}


and this is where i call this for different submenus

<script ="text/javascript">
var temp;
temp = getCookie("Projekte");
if(temp == "true"){
showMenu("Projekte");
}
temp = getCookie("Partner");
if(temp == "true"){
showMenu("Partner");
}
temp = getCookie("Mitgliedschaft");
if(temp == "true"){
showMenu("Mitgliedschaft");
}
</script>
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 106 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.