IE is stops Javascript with an error?
- by Mahmoud
hey there,
i have complete of creating a javascript that well allow visitors ones the mouse is over the button a menu drops down, at some point on FireFox its working fine and also safari, but when it comes to IE it stops the script from running, where on the IE i debugged my script using IE debugger and i found out the error causing is
frag+='<br /><li><form action="' + menuobj.items[i][1] + '" ><input type="submit" value="' + menuobj.items[i][0] + '" style="background-color:#000;border:hidden;color:#FFF"/></form></li><br />\n'
for reference below is the full function code
getmenuHTML:function(menuobj){
var menucontent=[]
var frag=""
for (var i=0; i < menuobj.items.length; i++){
frag+='<br /><li><form action="' + menuobj.items[i][1] + '" ><input type="submit" value="' + menuobj.items[i][0] + '" style="background-color:#000;border:hidden;color:#FFF"/></form></li><br />\n'
if (menuobj.items[i][2]=="efc" || i==menuobj.items.length-1){
menucontent.push(frag)
frag=""
}
}
if (typeof menuobj.cols=="undefined")
return '<ul>\n' + menucontent.join('') + '\n</ul>'
else{
frag=""
for (var i=0; i<menucontent.length; i++){
frag+='<div class="' + menuobj.cols.divclass + '" style="' + menuobj.cols.inlinestyle + '">\n<ul>\n' + menucontent[i] + '</ul>\n</div>\n'
}
return frag
}
},