setfocus after alert in javascript

A

amy

I have the follow javascript code in xsl file.
function focusme()
{
alert('wow');
document.papercaltbl('printorder').focus();
}

When you click the Submit button in the table, it call this function
to set focus to the printorder input field.

If the printorder is the first input field, then the set focus does
not work the first time call the function. It works the second time
and thereafter.
Note, if there is not alert before set focus, then it works everytime.


Now if the printorder is not the first input field, then it works
every time when call the function( including the first time). It's so
weird.


Any thought?

Amy
 

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,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top