| Author |
Any ideas why my JavaScript will not work in Firefox?
|
|
| Aaron Whiffin 2006-08-03, 11:10 pm |
|
Page in question is:
http://www.classiccarsforsale.co.uk...archadvance.php
If you change the country select box a function called changedcountry() is
called using JavaScript. If the country is "United Kingdom" a "UK Region"
select box will appear, if the country is something else, the "UK Region"
select box is hidden.
Also when the page is first loaded changedcountry() is called so that if the
country is not selected (which it shouldn't be) the "UK Region" select box
is hidden.
So when you first load the page you should just get the country region box,
then when this is changed to "United Kingdom" the second box will appear,
and if it is changed away from "United Kingdom" the second box should
disappear again.
It works in Internet Explorer and Opera, and I can see no problems, but if I
run in Firefox (latest version) it does not work.
JavaScript is enabled in Firefox and tested
Any ideas?
Thanks
| |
|
|
| Aaron Whiffin 2006-08-03, 11:10 pm |
|
>
> Maybe look at the errors in the Firefox JavaScript console.
Didn't know that existed - thanks
Turns out problem is document.all is causing it to break when I needed to
use document.getElementById()
- I had both
So now need to add some detection stuff
Thanks
| |
| Brian Wakem 2006-08-03, 11:10 pm |
| Aaron Whiffin wrote:
>
>
> Page in question is:
> http://www.classiccarsforsale.co.uk...archadvance.php
>
> If you change the country select box a function called changedcountry() is
> called using JavaScript. If the country is "United Kingdom" a "UK Region"
> select box will appear, if the country is something else, the "UK Region"
> select box is hidden.
>
> Also when the page is first loaded changedcountry() is called so that if
> the country is not selected (which it shouldn't be) the "UK Region" select
> box is hidden.
>
> So when you first load the page you should just get the country region
> box, then when this is changed to "United Kingdom" the second box will
> appear, and if it is changed away from "United Kingdom" the second box
> should disappear again.
>
> It works in Internet Explorer and Opera, and I can see no problems, but if
> I run in Firefox (latest version) it does not work.
>
> JavaScript is enabled in Firefox and tested
>
> Any ideas?
>
> Thanks
Dunno, but it works fine in Konqueror.
--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
| |
| Aaron Whiffin 2006-08-03, 11:10 pm |
|
>
> Didn't know that existed - thanks
>
> Turns out problem is document.all is causing it to break when I needed to
> use document.getElementById()
> - I had both
Update: Bit more research shows it works if you removethe document.all line
altogether and just reply on etElementById() will do that
| |
| Aaron Whiffin 2006-08-03, 11:10 pm |
|
> Dunno, but it works fine in Konqueror.
Should work fine in all now, hopefully
Thx
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |