Page 1 of 1
Firefox And Javascript
Posted: Sat Apr 16, 2005 5:23 am
by s.dot
These following two javascripts do not work in firefox. Maybe it's a user preference, or they are disabled for some reason.
Code: Select all
<script type="e;text/javascript"e;>
<!--
if(parent.resetForm)
parent.resetForm();
//-->
</script>
And alert boxes.
Anyone know why?
Posted: Sat Apr 16, 2005 6:27 am
by feyd
check the Javascript console. I'd guess it's your html comments being in the wrong place(s)
Posted: Sat Apr 16, 2005 8:10 am
by s.dot
Code: Select all
<div id="e;contents"e;>
<div><strong><a href=showme.php?u=<? echo $_COOKIEї'username']; ?> target="e;_blank"e;><? echo $_COOKIEї'username']; ?></a>: </strong><? echo $message32; ?></div>
</div>
<script type="e;text/javascript"e;>
<!--
if(parent.insertMessages && document.getElementById("e;contents"e;))
parent.insertMessages(document.getElementById("e;contents"e;).innerHTML);
//-->
</script>
<script type="e;text/javascript"e;>
<!--
if(parent.resetForm)
parent.resetForm();
//-->
</script>
that is how it is inserted in my HTML, however there are a few php/sql queries/commands before and after this part.
Posted: Sat Apr 16, 2005 10:45 am
by SystemWisdom
Is parent referring to a frameset, or a sub-window?
If it is a frameset, then the frameset file must have the corresponding functions, maybe show them? If it is a sub-window, then you shouldn't be using parent, but rather window.opener..
Posted: Sat Apr 16, 2005 11:24 pm
by s.dot
The code I pasted above is inside of a hidden IFRAME, but the javascript needs to call to the main page (parent) to reset the form.
Posted: Sun Apr 17, 2005 6:44 am
by feyd
post a link to a live version.