Jump to content

How to run a script when a hyperlink is pressed


pantinosm

Recommended Posts

Im not quite sure what you are asking here. Do you think you could give a bit more information?

Is it that you have lots of information and want to have links for searching and sorting this data? What type of searches would this be?
  If you want it to be seamless (Won't go to another page), you need to use an iframe, and have the link trigger a query in it from another .php file. You can set the iframed PHP file to use parent.xxx to change the HTML data of the main page, and just keep the main page hidden.
if you want to run a query (ie, perform a server side action) without reloading the page, then as taith suggested, it'd be a job for AJAX and would be invoked using javascript's onClick method.

for more info on AJAX, including tutorials, etc, try here: http://www.ajaxfreaks.com/
Well then you make the link direct to the page that contains the the query? Or is the point that you are redirecting to a page/site out of your control and are, perhaps, recording which pages/sites a user has viewed? In which case, i think yes, you would have to use ajax.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.