Click to See Complete Forum and Search --> : form dropdown issue with firefox


DeathfireD
01-05-2007, 02:53 AM
This is really weird to say the least. The same code i've been using on a number of my sites works both in IE and firefox but for some reason I moved the code to another site i'm working on and it only works in IE now.......Well I've never actually used it for remote urls just local so this may be my problem. Anyway heres the code.

Original Code

<form name="lang">
<select name="SelectURL" onChange="document.location.href=document.lang.SelectURL.options[document.lang.SelectURL.selectedIndex].value">
<option value="http://homeurl.com" SELECTED>Language</option>
<option value="http://homeurl.com">English</option>
<option value="http://externalurlone.com">Portuguese</option>
<option value="http://externalurltwo.com">spanish</option>
<option value="http://externalurlthree.com">German</option>
</select>
</form>


Second attempt

<form name="jump">
<select name="menu" onchange="document.location = this.value;" value="GO">
<option value="http://homeurl.com">Language</option>
<option value="http://homeurl.com">English</option>
<option value="http://externalurlone.com">Portuguese</option>
<option value="http://externalurltwo.com">spanish</option>
<option value="http://externalurlthree.com">German</option>
</select>
</form>


As you can see the I ended up changing all that onchange stuff in the first code to something shorter that my friend suggested. Still it only works in IE.

I did some searched on html forms and copy pasted the code to see if they worked in Firefox and I was shocked that they didn't. It seems like the page is trying to load but the default page stays there.

Anyone know how to do this without adding crazzy amounts of java script?

bradgrafelman
01-05-2007, 03:09 AM
Both codes worked fine for me.

If they aren't working for you, then it must be because of some other error... perhaps a Javascript error somewhere else on the page you're trying this on that has halted JS execution?

DeathfireD
01-05-2007, 03:13 AM
Both codes worked fine for me.

If they aren't working for you, then it must be because of some other error... perhaps a Javascript error somewhere else on the page you're trying this on that has halted JS execution?


hmm im not sure since it works fine on the page for everything but firefox.

bradgrafelman
01-05-2007, 03:15 AM
Any chance we can have an URL to the page in question?

I threw the code you provided up, so you can test it to see if it's just your installation, but I doubt this is the case... here's the link (http://bradg.njoe.com/dropdown.html) (will only be valid for a day or two).

DeathfireD
01-05-2007, 03:29 AM
http://otvote.otfans.net

I ran some tests. I put an alert in to see if the selected item was the correct url. It showed the correct url in the alert. I tested this method with 4 or 5 diffrent onChange jscript methods. It worked on them all on the site in question.

Then a friend said to try urlencode the urls since firefox maybe having an issue with 2 urls in one (google translator). That still didnt work. I also though maby you where right about the jscript hult code. My partner and I started noticing after people voted on a server googles ad syndicate bot would vote on it right after. So he put in some code to prevent that. But thinking about that even if he did then that would mean this code shouldnt work in IE or opera yet it does. Firefox seems to be the only one not liking it.

PS. I put the code on a blank html page and it works fine on the same server. So......ya tell me what you think.

bradgrafelman
01-05-2007, 03:44 AM
It has to do with FireFox's cache. As soon as I disabled cache, it worked. Not sure on a fix for this...

DeathfireD
01-05-2007, 03:52 AM
hmmmm ya your right. It may have something to do with our sessions for voting. Sessions last for 1 day. If thats the case then is there even a way to hack this up to work?

bradgrafelman
01-05-2007, 03:57 AM
Other than setting headers:

Cache-Control: must-revalidate, post-check=0, pre-check=0
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Pragma: no-cache

to try and force browsers not to cache the page, I'm not sure what to say. You might try giving those headers a go, though.

DeathfireD
01-05-2007, 03:59 AM
that would kind make the sessions pointless then huh? hehe so much for our 3rd method of preventing people from voting more then once.

I'll go try this and see what happends.

DeathfireD
01-05-2007, 04:15 AM
didnt work, I asked a friend to try it didnt work for him eithor. He also disabled his cache and it still didnt work. lol this is weird.

DeathfireD
01-08-2007, 03:54 AM
some new things I learned. When I ditch the dropdown idea and use just plain images and link to the google translator url without frames it still dosnt work. So this led me to think it was either my site's problem or it was a security thing google made to try and prevent people from doing what i've been trying to do.

So I went back to the google translate page and did it all over again this time leaving the frame at the top. I copied the url and pasted it as an image link again. This time it worked. the url structure is different with the frame. without the frame the google address is using an ip with the frame it uses http://translate.google.com/translate?........... Theirs allot of other changes to the url. try it here http://www.google.com/language_tools?hl=en

So this only leads me to think that it has nothing to do with my site and its googles doing. But what makes no sence is why would they use this to prevent only firefox users from it? IE and other web browsers seem to run the drop down and even the image links fine.

So recap:
- drop down dosnt work when I use the url for "remove google frame"
- drop down works when I use the url with the google frame at the top
- could this be an attempt to prevent people from doing what im trying to do?

Anyway if you guys come up with anything please tell me. I've posted on the google boards but no one seems to be talking.

Weedpacket
01-08-2007, 05:21 AM
Copying one of the translation URLs from the commented-out dropdown and pasting it directly into Firefox's address bar worked fine for me. So did using an alternate IP and using "www.google.com" directly. That's with the cache running.

Perhaps you should get in touch with Google and ask them about it, or raise it on the Google webmaster forums; you mention that their ad syndicate bot puts its nose in unwanted.

Incidentally, "Open Tibia" sounds really painful :D

DeathfireD
01-08-2007, 05:36 AM
Copying one of the translation URLs from the commented-out dropdown and pasting it directly into Firefox's address bar worked fine for me. So did using an alternate IP and using "www.google.com" directly. That's with the cache running.

Perhaps you should get in touch with Google and ask them about it, or raise it on the Google webmaster forums; you mention that their ad syndicate bot puts its nose in unwanted.

Incidentally, "Open Tibia" sounds really painful :D

ya putting the addresses in firefox's address bar works fine its just it dosnt like the urls in any type of link on my site for some reason.

I cant find a direct e-mail address to any google help. In their help section they tippy toe around e-mails and try and force you to go to the faq section or the bbs board. I've made a post on the bbs but no one seems to care :/

Open Tibia painful I dont understand?

Weedpacket
01-08-2007, 06:07 PM
Open Tibia painful I dont understand?
http://www.bartleby.com/107/61.html

DeathfireD
01-10-2007, 07:06 PM
http://www.bartleby.com/107/61.html

haha oh I get it now :P.

na open tibia is a open source tibia emulator and Tibia is a MMORPG.

Anyway still no luck with google. People either dont know the problem or ignore my messages.