Javascript Tooltip / Posts /

cant pass value to php file

0
I'm trying to use the AJAX tooltip to pass a value to a php file, before echo'ing back into the tooltip. In the php file I have a get statement to get the value in my context, but its not working. Is this a common problem?
Drew  10 years ago   viewed: 3557    

2 Answers

0
I don't think it is a common problem. Maybe you haven't coded it properly. Would you give more details how you use it?
(Sorry I am not good at PHP, so you only need to list the javascript and html that you coded related it to the tooltip). 
Milo   10 years ago
0
In javascript I have: 
var myAjaxSettings = {
            context: { CODE: 5 },
            success: myCallback,
            responseType: "xml"
        };

In HTML I have:

<button onclick='tooltip.ajax(this, &quot;course_info.php&quot;, myAjaxSettings)' style='width:320px;'>

and in the php page my ajax request goes to I have:

<?php
function getTooltipContent($id) {
return $id;
}

echo getTooltipContent( $_GET['CODE']);
?>

Thanks so much for any help
Drew   10 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: