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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.