Vasanth_Kumar
asked on
How to send an Email in JavaScript function which will be called when onUnload event occured?
I have to send an Email in java script function which will be called when onUnload event occured.
You can call a mailto: link onunload, but that only opens the e-mail in the client's email program of choice. To send an e-mail discreetly (no user interaction) you have to use server side scripting.
ASKER
To send an e-mail discreetly (no user interaction) ,I have to use server side scripting.Can we execute that server side scripting in javascript function which will be called when onUnload event occured?
My actual requirement is that when i am leaving the current page to another page by clicking back or forward buttons
and by closing the window and by clicking any one of the href links in the current page , then i have to send the Email.
Can u give me the idea how to do that.
My actual requirement is that when i am leaving the current page to another page by clicking back or forward buttons
and by closing the window and by clicking any one of the href links in the current page , then i have to send the Email.
Can u give me the idea how to do that.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
And to make sure you send it, you would have to open the fully qualified url to the program in a new window which can be blocked by popup blockers...
I will want to see the ajax method actually run over the net on a standard box since onUnload may unload all scripts before they are executed
What is the aim of this email?
I will want to see the ajax method actually run over the net on a standard box since onUnload may unload all scripts before they are executed
What is the aim of this email?