Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save On Exit

Status
Not open for further replies.

zzfive03

Programmer
Jun 11, 2001
267
On my ASP page, I have a text box. I would like the script to run my "save to database" function when the user moves the cursor out of the text box (sort of like an autosave) without the need to press the save button. Any ideas on how I can call a 'on-cursor-off' type command?
 
onBlur is the javascript event that would fit your needs -- but to call a "save to database" function, which is most likely server side code, you'd need to do a form submit (
Code:
document.formName.submit();
) onBlur to get the page to reload in order to get the server side code to save it --

Does that make any sense -- or better yet, does it help?

:)
Paul Prewett

penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top