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!

close browser update database

Status
Not open for further replies.

queryguy

Programmer
Oct 10, 2003
23
SG
Hi experts,

is there a way to update my database upon closing the browser without any popup window?
For example like a chat room, when you close the browser it update the database and let other know you have left the chat room.

I tried onunload but it doesn't seem to work... maybe the closing action is too fast for the command to be execute?


PLease kindly help me thanks.
 
I don't think that onunload would work because you can only call javascript commands from onunload, and javascript cannot do server side commands like changing a database. The only way I could see this working is if you open another page using onunload that updates the database and then closes itself, but you said you didn't want to open another window so that's not gonna work for you.

-kaht

banghead.gif
 
so which script language can do server side commands ?

But how about those java applet script? like a java applet chat room, when the user left (Close the browser) it can update? How they do it?
 
I haven't coded an applet for a long time, and even then I never did any database communication with one. But they are much different than javascript. You're looking at something along the lines of asp or php to do what you're looking for I'm afraid (or perphaps using an applet if you so choose)

-kaht

banghead.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top