I am very (very) used to PHP but just trying to grips with JQuery/Ajax and
this is a very simple problem that I cannot find an easy - & understandable
answer to especially one that works - strange I know.  My experience is that
all answers to this question - on another site - are too complex and totally
miss the point.

Take a standard HTML link   Get this page   now add a get variable 
?trythis=a-changing-value Get this page 

I want to pass ?trythis=a-changing-value via JQuery/Ajax to another page,
perform a query based on the actual value of 'trythis' ( but for this
example I am only using echo $_GET[] as I can work out the PHP query with
ease ONCE i can get the trythis variable to the page) and then display those
results without a page refresh on the original page. e.g.

Page one

in the head:

$(document).ready(function() {
    $("#idoflink").click(function() {

     somewhere I need to declare the variable trythis and use it in
JQuery/Ajax- WHERE and HOW  and no a fixed hard coded reply will not help,
the variable trythis will have changing values

      $("#display_results_here").load("tryit.php");

    });
  });

In the body

?trythis=a-changing-value Get this page 

<div id="display_results_here"></div>

Then on the page tryit.php a simple echo $_GET['trythis'];

What I cannot do and I do not seem to get a sensible, easy to follow and
understandable answer from knowledgeable JQuery people is find out how to
pass the valiable trythis to the page tryit.php and then return the result,
in this case a simple php echo.

-- 
View this message in context: 
http://old.nabble.com/Simplae-JQuery-Ajax-question---GET-variables-tp27229104s27240p27229104.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to