
Javscript Issue in Firefox
I am trying to add some simple javascript code to one my webpages as I need to hide a couple of divs on page load. Firefox does not seem to accept this code but all other browsers do. I have a similar issue with Firefox in the past and found a way around it. I would highly appreciate it if someone could shed some light on this issue so that I could tackle this Firefox problem I have once and for all.
Thanks in advance!
ISSUE
Firefox does not hide the divs and gives me the following errors:
script2 is not defined
script 22 is not defined
CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>...</title>
<script type="text/javascript">
function initiate(){
counter=1;
script2.style.display = "none";
script22.style.display = "none";
}
...
</script>
</head>
<body onload="initiate();">
<div id="script2">
...
</div>
<div id="script22">
...
</div>
</body>
</html>
-
imarketstuff -
[ 1 ] Thanks
SignatureI MARKET STUFF{{ DiscussionBoard.errors[1893860].message }} -
-
osegoly -
Thanks
{{ DiscussionBoard.errors[1894119].message }} -
-
Jinil Sung Banned-
Thanks
{{ DiscussionBoard.errors[2257497].message }} -