Jump to content

Allowing JavaScript to execute before following a link


hellonoko

Recommended Posts

yep. you would have to do that all clientside.  You would have to be more specific than "follow the link" to get a more detailed answer, but for instance, if you don't want the link to be displayed until some js is executed, you could a) put the js into an onload call in your body tag or a document.load event listener, have the link display by document.write after the js code executes, b) have js change the visibility of the link (by making some div around it visible or something, once it is done executing.

 

But no, you cannot have that logic in php.  php looks at js as plain text to be sent to the browser.

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.