Forum Moderators: open
[center] setTimeout('window.location = theURL', '0');[/center] But this does not:
[center] window.location=theURL;[/center] Actually, it works fine in IE6/Win. But with NN4/Mac nothing happens (and no error is generated), and in Safari/Mac nothing happens either.
Thanks for your help, -MBJ-
So let me throw something else at you all. NN4 doesn't like this code:
It says, "document.myform has no properties." But IE thinks the code is just fabulous.
Here's the form code. I'm just using it to store some data, the form never gets submitted:
[1]<TABLE style="position:absolute; visibility:hide">
<TR>
<TD>
<FORM ACTION="" METHOD=POST name=myform style="visibility:hidden">
<INPUT TYPE=text NAME=description VALUE="my description here">
<INPUT TYPE=text NAME=amount VALUE="27.06">
<INPUT TYPE=text NAME=frequency VALUE="1" SIZE=2>
</FORM>
</TD></TR></TABLE>[/1] Any ideas? Thankie-doodle, -MBJ-
<INPUT TYPE=text NAME=description id="description" VALUE="my description here">
Then, in your script, do something like this:
if(document.getElementById) {
//This will make your script work in DOM compliant browsers
description = document.getElementById('description').value;
}
else if(document.all) {
//This is for IE4-5
description = document.all['description'].value;
//This is where you could've done what you already do:
//description = document.myform.description.value;
}
else if(document.layers) {
//For the NN4 beast...
description = document.layers('description').value;
}
Korkus, I don't know what "DTD" is, and I don't know what you mean by that I should quote all attributes in the form, but if DrDoc's answer is the easiest solution for allowing NN4 to get a value from a field, then I guess it doesn't matter.
Thanks again, -MBJ-
As far as other browsers goes... To help you understand the problem you need to undertand what exactly a DTD is. A document type definition serves as a heads up for the browser. It tells the browser which version of the HTML standard you have attempted to follow. This saves the browser some guessing. Compare it to different styles of writing. For example, if you're an archaeologist you are supposed to follow the SAA guide. For other types of writing you are supposed to following a different standard. This helps a reader (or editor) to follow your line of thinking better.
Likewise, specifying a DTD lets the browser know in advance what to expect, and render the page accordingly. When it comes to most non-IE browsers (such as Mozilla or Opera) they tend to render your page better when the DTD is present, provided that your page actually follows the DTD ;)