__doPostback

G

Garry Weston

I have several forms in a web application the allow the user to hit the
press the enter button and cause a postback.
I have the following javascript handling the key press if the key code is
13:

/* this function handles the actual submission of the search criteria */
function disableSubmit(){
// need to disable the submit button
document.getElementById("btnSubmit").value = "Please Wait ....";
document.getElementById("btnSubmit").disabled = true;

// force a postback with the btnDoSubmit as the caller
__doPostBack('btnDoSubmit','');

}

My problem is, that on one page this code does not work.
The olny difference between the forms is the way they are called via a hyper
link. This form has a target of _blank.
I keep getting the following error.
Microsoft JScript runtime error: Object expected

Any help would be appreciated.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top