I have a link at a page. It has a email form that sends an email to my address. I want to thank sender. I'm redirecting to another page that thanks the user. But i want a thank notification to be displayed in the same page with close option. Please help of with code.
I got an idea. What i can do is have a form or div with thank notification. I can hide and remove it from flow at normal page load an show when an email has been sent. For this we need two functions: one each to show and hide. But i have a problem about calling show function after an email has been sent. When the page loads normally i call a hide function on page load.
"load same page and load another function on onload instead of mentioned on onload in the page"
Not sure what you mean here... You want the function to be in the window.onload but the script should be executed after other functions in the onload? Or you want to put the function in the page init? In other words, you want to hide the script from view source? Not sure you can hide your script source from client side anyway...
Okay that seems not to be possible. I'v thought of another way. Using cookies. First i set a cookie when an email has been sent. And checking the existence of cookie i decide to call which function. I had viewed the way of setting cookie in w3schools but i found it two messy to understand. Please give an easy example of setting cookie and checking its existence.