how to run a function when a link is clicked
Hi ...
I have a link now.. if i click on that link i need to run a function in the background.for that one i need to use a scripting language to connect between those two. can any body tell me how to connect using java script or any other scripting language... |
This could help you:
http://www.onlinetools.org/articles/...ivejavascript/ This is the author's site: http://icant.co.uk/html/scripting.php In short, if you're serious about web programming, not a single “onclick” should show in your HTML code; you should, from the HEAD of your document, place an event on the window object to make your script start after the page is loaded; the script will then place an event listener on the link node, for whatever action you want it to do. Yves. |
Be more specific. Do you mean a link in a web page (html, php, ...), a link between files, or something completely different?
|
And if what you want is calling a server in Javascript in the background, your action should use the technique known as “ajax”.
Yves. |
All times are GMT -5. The time now is 05:39 PM. |