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

Posts: 1
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
 
Old 05-04-2007, 05:52 AM Re: Firefox Javascript Problem
tripy's Avatar
Fetchez la vache!

Posts: 1,850
Name: Thierry
Location: In the void
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.
__________________
Listen to the ducky: "This is awesome!!!"

tripy is offline
Reply With Quote
View Public Profile
 
Old 04-26-2008, 09:38 AM Re: Firefox Javascript Problem
Junior Talker

Posts: 1
Name: Allan
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
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
 
Reply     « Reply to Firefox Javascript Problem

Thread Tools

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

vB 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.11674 seconds with 12 queries