DOM documentation for IE?

B

Ben Crowell

Can anyone recommend a good place to look online for documentation for
IE's DOM? E.g., I have this code:
if (window.location.search == "?test") {
...
}
It works in Firefox but not in IE, and I'm not having much luck googling
for information about how to make it work in IE.
 
R

RobG

Can anyone recommend a good place to look online for documentation for
IE's DOM?

MSDN: HTML and CSS
<URL: http://msdn.microsoft.com/en-us/library/aa155110.aspx >

Search is covered here:
<URL: http://msdn.microsoft.com/en-us/library/ms534620(VS.85).aspx >


If you have issues with getting scripts to work, post here.

E.g., I have this code:
   if (window.location.search == "?test") {
     ...
   }
It works in Firefox but not in IE, and I'm not having much luck googling
for information about how to make it work in IE.

The following "works" for me in IE 6: when the page is loaded, the
aler shows an empty string. When submit is clicked, it submits the
form and reloads the page, then shows an alert with the string "?
inp0=hey", which is what I'd expect.

<script type="text/javascript">
window.onload = function() {
alert(window.location.search);
}
</script>
<form action="#">
<input type="text" name="inp0" value="hey">
<input type="submit">
</form>
 
B

Ben Crowell

RobG said:
MSDN: HTML and CSS
<URL: http://msdn.microsoft.com/en-us/library/aa155110.aspx >

Search is covered here:
<URL: http://msdn.microsoft.com/en-us/library/ms534620(VS.85).aspx >


If you have issues with getting scripts to work, post here.



The following "works" for me in IE 6: when the page is loaded, the
aler shows an empty string. When submit is clicked, it submits the
form and reloads the page, then shows an alert with the string "?
inp0=hey", which is what I'd expect.

<script type="text/javascript">
window.onload = function() {
alert(window.location.search);
}
</script>
<form action="#">
<input type="text" name="inp0" value="hey">
<input type="submit">
</form>

Thanks for the help! Sorry, I was just confused. The reason it wasn't
working in IE was unrelated to the DOM.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top