473,322 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Javascript function works in IE, not in Firefox

Here is the function, it works perfectly in IE, but does nothing in
Firefox. Help! :)

<form name ="browsedistrict">
<FONT SIZE="2" FACE="arial, helvetica">Browse by District:<select
name="selectdistrict" size="1" onchange="gotodistrict()">
<option value="none">--Select a District--</option>
<option value="amaddist">Amador</option>
<option value="antdist">Antelope Valley</option>
<option value="buttdist">Butte</option>
..
..
..
</select>
</form>

Here is the javascript function:

function gotodistrict(){

if (browsedistrict.selectdistrict.value == "amaddist")
{
map.addOverlay(amaddist);
map.centerAndZoom(new GPoint(-120.498480, 38.485401), 8);
}
else if (browsedistrict.selectdistrict.value == "antdist")
{
map.addOverlay(antdist);
map.centerAndZoom(new GPoint(-118.029074, 34.630379), 8);
}
else if (browsedistrict.selectdistrict.value == "buttdist")
{
map.addOverlay(buttdist);
map.centerAndZoom(new GPoint(-121.607870, 39.675216), 8);
}
..
..
..
}

Oct 28 '05 #1
2 1291
gizoto316 a écrit :
Here is the function, it works perfectly in IE, but does nothing in
Firefox. Help! :)

<form name ="browsedistrict">
<FONT SIZE="2" FACE="arial, helvetica">Browse by District:<select
name="selectdistrict" size="1" onchange="gotodistrict()">
<option value="none">--Select a District--</option>
<option value="amaddist">Amador</option>
<option value="antdist">Antelope Valley</option>
<option value="buttdist">Butte</option>
.
.
.
</select>
</form>

Here is the javascript function:

function gotodistrict(){

if (browsedistrict.selectdistrict.value == "amaddist")


All you need is explained here:
http://www.mozilla.org/docs/web-deve...tml#dom_access

Gérard
--
remove blah to email me
Oct 28 '05 #2
Awesome, I got it to work. Thanks dude!

Oct 28 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net...
8
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
16
by: Roman Ziak | last post by:
Hello, there were times when I used to be looking for a way to access JavaScript Global object similar to those found in VBScript or PHP ($GLOBALS). At present this has only academic value for...
12
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more...
2
by: Altman | last post by:
I have created an ascx control and I am calling registerclientscriptblock. The path to the js file is relative to the aspx page and not the ascx file. The function runs fine in IE7 but in...
7
by: psybert | last post by:
Hello everyone, Long time lurker, first time poster. I'm a beginner coder, and I've taught myself everything with the help and expertise of users and websites like this one. I normally figure out...
3
by: willyWEB66 | last post by:
Hi everyone, I'm having problem with the sequence of execution for xml.onload. It works fine if your not passing parameters to onload event but my code needs to pass parameter to its function. I'm...
2
by: neeebs | last post by:
Hi, I'm not sure if this is a javascript problem per se, but here goes. I have an xsl document with a python function defined within a <script> block. Elsewhere in the xsl file, within a python...
1
by: xtremebass | last post by:
Hello Bytes, i have a calender program which is created by using Javascript. when i execute that program using Internet Explorer,it works properly but when i tried in Mozilla firefox it didnt...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.