Skip to main content
January 16, 2012
Question

Passing variables to same page with jquery

  • January 16, 2012
  • 1 reply
  • 2184 views

Hi

I am trying to pass a variable to a current page with out refreshing the page is this possible?

So when I do: ome.php?var=2000 to the webpage ome.php.

This is done without refreshing the page just that the variable is passed. Maybe with jquery.

Is it possible?

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
January 17, 2012

you're trying to pass a variable to an html page using php?  if yes and you're using jquery, check the ajax events.

Rob Hecker2
Legend
January 17, 2012

It is certainly possible with simple javascript. No need for jquery. But for PHP to process it, the page would have to be refreshed. In your form fields you can use the onBlur event.

January 18, 2012

Hi

So I have this link:


<a href="Video.php?vid='.$vidfield.'"><img src="'.$vidthumb.'" width="180" height="105" align=center /></a>

Video.php has $vidid=$_GET['vid'];

Then using flashvar the $vidid is passed to videoplayer that is on Video.php. In order to use flasvars I need to know which

link was actually clicked.But clicking link refreshs page making playing video not dynamic.

But as you said : for PHP to process it, the page would have to be refreshed.

How can I use onBlur event in my code to stop refresh. Just started read onBlur event.

Thanks.