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

Passing variables to same page with jquery

Guest
Jan 16, 2012 Jan 16, 2012

Copy link to clipboard

Copied

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

Views

2.1K
Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Report

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