thankgodfortektips
Programmer
Hey all,
I have an asp page which inserts records into a db. I have a flag that will not allow the insert until it is set to 1. I also have drop down boxes which will submit the form - which in turn fills in different information on the form dependant on what was selected in the drop down (but the record is not inserted until the flag is set to 1).
After the submit, the page jumps back up to the top of the page, which is confusing for the user. What I want is after the submit move the focus to a lower field.
The problem I am having is that the below function works, but the focus is moving to fast... therefore, the focus will move to the right field, but then the time delay on the submit makes the page return to the top.
Is there a way to make the function below wait for the submit to finish?
The drop down boxes call:
function GetAddressInfo(){
//submit the form
document.form1.submit();
//move focus down to the round trip field
var the_form = document.forms["form1"];
the_form.RoundTrip.focus();
}
Thanks in advance!
I have an asp page which inserts records into a db. I have a flag that will not allow the insert until it is set to 1. I also have drop down boxes which will submit the form - which in turn fills in different information on the form dependant on what was selected in the drop down (but the record is not inserted until the flag is set to 1).
After the submit, the page jumps back up to the top of the page, which is confusing for the user. What I want is after the submit move the focus to a lower field.
The problem I am having is that the below function works, but the focus is moving to fast... therefore, the focus will move to the right field, but then the time delay on the submit makes the page return to the top.
Is there a way to make the function below wait for the submit to finish?
The drop down boxes call:
function GetAddressInfo(){
//submit the form
document.form1.submit();
//move focus down to the round trip field
var the_form = document.forms["form1"];
the_form.RoundTrip.focus();
}
Thanks in advance!