473,383 Members | 1,789 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,383 software developers and data experts.

Submit a form in FireFox ...

Hi,

Maybe someone know why this code does not work ...

<html>
<form name='frmData' action='http://www.adrX.ca/usr_auth.asp'
method='POST'>

<input type='hidden' name='USER_ID' value='12345'>

<input type='hidden' name='lang' value='FR'>

<input type='hidden' name='TOKEN' value='555555'>
<script type="text/javascript">
document.frmData.submit();
</script>
</form>
</html>

Thanks
Chris

Jul 23 '05 #1
5 6152
Lee
ch**************@hotmail.com said:

Hi,

Maybe someone know why this code does not work ...

<html>
<form name='frmData' action='http://www.adrX.ca/usr_auth.asp'
method='POST'>

<input type='hidden' name='USER_ID' value='12345'>

<input type='hidden' name='lang' value='FR'>

<input type='hidden' name='TOKEN' value='555555'>
<script type="text/javascript">
document.frmData.submit();
</script>
</form>
</html>


By putting the Javascript code before the closing </form> tag,
you're asking the browser to submit a form that doesn't exist, yet.

<html>
<body onload="document.frmData.submit()">
<form name="frmData" ...>
....
</form>
</body>
</html>

Jul 23 '05 #2
ASM
ch**************@hotmail.com wrote:
Hi,

Maybe someone know why this code does not work ...
no, but :
onload= Function("document.forms['frmData'].submit()");
or
setTimeout('document.frmData.submit()',0);
both work

<html>
<form name='frmData' action='http://www.adrX.ca/usr_auth.asp'
method='POST'>

<input type='hidden' name='USER_ID' value='12345'>

<input type='hidden' name='lang' value='FR'>

<input type='hidden' name='TOKEN' value='555555'>
<script type="text/javascript">
document.frmData.submit();
</script>
</form>
</html>

Thanks
Chris

--
Stephane Moriaux et son [moins] vieux Mac
Jul 23 '05 #3
ch**************@hotmail.com wrote:
Hi,

Maybe someone know why this code does not work ...

<html>
<form name='frmData' action='http://www.adrX.ca/usr_auth.asp'
method='POST'>

<input type='hidden' name='USER_ID' value='12345'>

<input type='hidden' name='lang' value='FR'>

<input type='hidden' name='TOKEN' value='555555'>
<script type="text/javascript">
document.frmData.submit();
</script>
</form>
</html>


Only a guess, but I'd move the script block to after the </form>
element. I'm guessing that the form is not completed when the script
tries to run.

Have you looked at the Javascript console in Firefox? That's usually
very helpful.

--
Tim Slattery
Sl********@bls.gov
Jul 23 '05 #4
ASM
Tim Slattery wrote:
ch**************@hotmail.com wrote:

Hi,

Maybe someone know why this code does not work ...

<html>
<form name='frmData' action='http://www.adrX.ca/usr_auth.asp'
method='POST'>

<input type='hidden' name='USER_ID' value='12345'>

<input type='hidden' name='lang' value='FR'>

<input type='hidden' name='TOKEN' value='555555'>
<script type="text/javascript">
document.frmData.submit();
</script>
</form>
</html>

Only a guess, but I'd move the script block to after the </form>
element.


Tried that and ... no more :-(
Have you looked at the Javascript console in Firefox? That's usually
very helpful.


not really an help :
"the form has no properties"

I think FF wait end of page
an onload
or a setTimeout (timer=0)
are OK


--
Stephane Moriaux et son [moins] vieux Mac
Jul 23 '05 #5
Thanks to you all,

I found, with putting a function called on the body.onload event

Chris

Jul 23 '05 #6

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

Similar topics

5
by: terence.parker | last post by:
I have a PHP application which I wrote last year - and the JavaScript worked fine then. For some reason, now it doesn't - neither on IE nor Firefox. Has something changed? When I click on my...
5
by: Pascal Batzli Jr | last post by:
Hello, I have a strange situation happening on the code below. When I first load the page, as I change any of the three combo boxes I have created, the onchange event is fired and the form should...
5
by: antonyliu2002 | last post by:
Hi, It looks like so many people are having problems with the javascript submit in firefox. I searched around, but haven't found a solution yet. Mostly, people were saying, try this or try...
5
by: Steve JORDI | last post by:
Just a question using images as submit buttons and PHP4.4.4. It seems that my code correctly works in FireFox but not in IExplorer. For example, I have a FORM with 2 buttons called "search" and...
6
by: Boldgeek | last post by:
I am trying to develop an app that will allow automatic updating of a web form which uses multipart/form-data enctype (as it MIGHT be sending an image) I have an example form, which when...
6
by: yawnmoth | last post by:
I'm trying to write a so-called bookmarklet for a specific web app and am having some difficulty. One of the names of a specific forms inputs is submit. As such, doing...
1
by: rynato | last post by:
I ran into an interesting problem while working on a form: I have a drop down list (think <form><select><option>...) of 'open sessions' which a user can choose from to continue entering data....
1
by: Derek Basch | last post by:
I spent several hours struggling with dynamic form fields added with appendChild or innerHTML not POSTing on submit in Firefox. The only way I found to make it work is to append any created fields...
3
by: CAG | last post by:
Hello, I have following scenario in my web application. I want to load different web forms in single iframe. Iframe in contained in an ASP page. ASP page has “Submit” button, which submits iframe...
5
by: hannie | last post by:
onKeyPress does not work in Firefox. If use tab to navigate each field and press "Enter" on "Next" button to submit form and process to the next form / page, IE works well even if without onKeyPress...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.