PDA

View Full Version : IE bug - onclick



SteeleR
04-08-2008, 12:08 PM
here's the template:
http://80.80.147.122:81/templates/58/

in IE6/7 when you press one of the search menu items an error popups saying that something is not correct at 'onclick="switchSearchTerm(this)"' but...

Can anyone help me out...

Nile
04-08-2008, 10:03 PM
First off just to be neat, you should have your onchange with a capital 'C'. onChange.
Now that thats done, this:


e.getElementsByTagName("span")[0].style.minWidthe = "";

Should be:


e.getElementsByTagName("span")[0].style.min-width = "";
And:


e.getElementsByTagName("span")[0].style.minWidthe = "31px";

should be:


e.getElementsByTagName("span")[0].style.min-width = "31px";

This:

e.getElementsByTagName("span")[0].style.lineHeight = "";
And:


e.getElementsByTagName("span")[0].style.lineHeight = "16px";
Should be:


e.getElementsByTagName("span")[0].style.line-height = "";

And:


e.getElementsByTagName("span")[0].style.line-height = "16px";

This:


e.getElementsByTagName("span")[0].style.backgroundColor = "";

And:


e.getElementsByTagName("span")[0].style.backgroundColor = "#FFFFFF";

Should be:


e.getElementsByTagName("span")[0].style.background-color = "";

And:


e.getElementsByTagName("span")[0].style.background-color = "#FFFFFF";

Few, that was a lot!

Nile
04-10-2008, 11:48 AM
Did this help at all? I would like to know because I spent a lot of my time on it.

Pseudoquazi
04-10-2008, 07:39 PM
...an error popups saying that something is not correct at 'onclick="switchSearchTerm(this)"'....

Maybe you know this already, but the error can come up at the onclick when there's an error in the function. (Just a note.)