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

form.submit() not working sometimes in IE

I'm submitting a form using the following code and sometimes, it
doesn't get submitted. I have Tomcat 4.1.24 on the backend and I am
trying to grab some extra information from the server for my current
page. I do this by submitting a form and setting the target as an
iFrame on my page. It works like 85% of the time. The other 15% of the
time, IE just sits there and times out. When a place a sniffer on the
port, the Post is never going through. I can't hit anything on the
current session anymore either. Is this a known issue with IE? Does
anyone know of a workaround?

Code....
//////////////////////////////////////////////////////////
try {
document.body.style.cursor = "wait";
var oForm = document.getElementById("GetEntitlementsForm");
oForm.target = "DataExchangeFrame1";
oForm['GetEntitlementsForm_DriverValue'].value = DriverValue;
oForm['GetEntitlementsForm_WhatToDo'].value =
"GetEntitlementList";
oForm.submit();
} catch(ex) {
alert("There was an error!");
alert(ex);
}
//////////////////////////////////////////////////////////

Thanks in advance.
Jul 20 '05 #1
1 16847
I wouldn't personally use the method to refer to the form ie getElementById.

Just use a with statement to cut down the code.

with (document.GetEntitlementsForm) {
target = "_self";
Driver.value = "someValue";
WhatToDo.value = "someValue";
submit();
}

This way makes it more readable and easy to edit. Is the try/catch clause
implemented yet? I wasn't aware that you could use this yet in JavaScript
although the words are reserved.

Peter.

"Ryan Cox" <Ry******@yahoo.com> wrote in message
news:8b**************************@posting.google.c om...
I'm submitting a form using the following code and sometimes, it
doesn't get submitted. I have Tomcat 4.1.24 on the backend and I am
trying to grab some extra information from the server for my current
page. I do this by submitting a form and setting the target as an
iFrame on my page. It works like 85% of the time. The other 15% of the
time, IE just sits there and times out. When a place a sniffer on the
port, the Post is never going through. I can't hit anything on the
current session anymore either. Is this a known issue with IE? Does
anyone know of a workaround?

Code....
//////////////////////////////////////////////////////////
try {
document.body.style.cursor = "wait";
var oForm = document.getElementById("GetEntitlementsForm");
oForm.target = "DataExchangeFrame1";
oForm['GetEntitlementsForm_DriverValue'].value = DriverValue;
oForm['GetEntitlementsForm_WhatToDo'].value =
"GetEntitlementList";
oForm.submit();
} catch(ex) {
alert("There was an error!");
alert(ex);
}
//////////////////////////////////////////////////////////

Thanks in advance.

Jul 20 '05 #2

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

Similar topics

14
by: smilemaster | last post by:
I have recently started experiencing form data loss. Here is an example: ====test_form1.php==== <form method="POST" action="test_form2.php"> <input name="textboxvalue" type="text" size="20">...
1
by: Eric | last post by:
Hello everyone, I am pretty much newbie to ASP so please bear with me as I explain my problem. I currently have a main form which displays data queried from a SQL database. From that main page...
5
by: Jeremy | last post by:
I have a very large HTML form (with about 50 fields) that's being submitted to an ASP page via the "POST" method. I don't use "GET" because the data would probably exceed the limit allowed in the...
2
by: e | last post by:
IE6. I have a form that can take a while to process once the user submits it. So upon submittal of the form, the onclick event for the submit button changes some text on the screen to say 'please...
14
by: threeflush | last post by:
I'm supporting an ASP legacy application and need to implement "autosave" functionality. I have two frames, one that holds tabs displaying different pages a user can select, and the other that...
4
by: Peloux | last post by:
Hi, I have written some htc in order to validate data in a form. most of htc are attached on 'onblur' event. Now, we would like to use the Enter Key to sublit form, so we use the following...
3
by: Mike | last post by:
Hello: I was not able to find a regular ASP group, so I posted this here instead. I have a web app which is actually just ASP using VBScript as the server-side language, running on IIS6. ...
8
by: Gert | last post by:
Hi, I have a form (server side) because of the filling of variables through the application. But now I need to post it to an url on submit. My .HTML form looks like this, but how to translate it...
3
by: Bill | last post by:
I'm using the POST method to submit a simple form html page with yes/no and checkbox fields to an asp response page which stores the values in a new dim string, then uses it to build a new table...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.