Jump to content

How to Pass a php value to a javascript pop up


chauhanRohit

Recommended Posts

how can i do this ? i  have a number of links , when i click one a pop up is displayed, i need to run a php script depending upon which link is clicked.

 

Or can  i run a javascript function once a query string is passed in the url

 

Please advice.

Edited by chauhanRohit
Link to comment
Share on other sites

  • 2 weeks later...

Well, it all depends on where the variable is being stored in PHP. For instance, if you are getting the variable via the POST method from a form. Javascript already has functions built in to get these types of variables from the URL via parsing, but you have to break it down first. It just really depends on what you are trying to do. I find that almost 80% of time, it's not necessarily if the code can DO something or not. It's really the logic behind the execution of the challenge. 

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.