Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Passing variables to same page with jquery

Guest
Jan 16, 2012 Jan 16, 2012

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?

TOPICS
Server side applications
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 17, 2012 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 17, 2012 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 18, 2012 Jan 18, 2012
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines