Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Firefox Javascript Problem
Old 05-04-2007, 05:14 AM Re: Firefox Javascript Problem
Junior Talker

Posts: 1
Trades: 0
Is doesn't need to have an id you can also use a class name or something.

document.forms works only on IE and not on firefox, always use

document.getElementById( )
Ottie is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-04-2007, 05:52 AM Re: Firefox Javascript Problem
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
One thing that can cause this error too is that your javascript is placed below the form.

Check this out, javascript is interpreted before the end of the page loading, so if your form is placed after it, it will try to access your form before the browser have displayed id, thus the "no action" effect...

Either place your javascript after the form, or use a function that will be called upon the document.onLoad trigger.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 04-26-2008, 09:38 AM Re: Firefox Javascript Problem
Junior Talker

Posts: 1
Name: Allan
Trades: 0
In Firefax you can use:

var = document.<formname>.<elementname>.value to get the contents of an elements

<form name="myform">
<input name="input1" type="text" size="25" value="123"
<submit..... etc etc

var=document.myform.input1.value

var becomes 123 unless you type something else in....
astecme is offline
Reply With Quote
View Public Profile
 
Old 07-17-2008, 04:05 PM Re: Firefox Javascript Problem
Junior Talker

Posts: 1
Name: Jono Mckay
Trades: 0
Hi,
Thought I would post a follow up to the problem with firefox and javascript form submits.
I have found a way around it: You must return false; after the statement.

i.e: <button type="submit" onclick="{document.forms[0].submit(); this.disabled=true; return false;}">

This now works in Firefox aswell as IE! Hope this helps
JohnnyRb is offline
Reply With Quote
View Public Profile
 
Old 09-08-2008, 08:12 PM Re: Firefox Javascript Problem
Junior Talker

Posts: 1
Name: Alfonso Marin
Trades: 0
Hi, i'm new and I just want to add a small scenario that you didn't mentioned here.

I was having the same problem that Firefox didn't submit the form.

Just for the record: Make sure none of our buttons, or fields is called "submit" because it will cause cause the function to "disapear"
Alfonsomarin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Firefox Javascript Problem

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14846 seconds with 11 queries