views:

46

answers:

0

Hi guys,

Here is my anchor tag, onclick of which i am going to call function which creates dataline chart:

echo "<a id = \"#dhf\" class = \"graph_dhf\" href = \"javacript void(0)\" onclick=\"open_page('senddata($unm)', 'my_chart1');\">datalinechart</a>";

here

  1. open_page('url', target) function in ajax_navigation.js page which i set as a src in script tag. This function creates htmlrequest object and sends response text.
  2. my_chart1 is the targeted div tag.
  3. senddata($unm) is a function which creates open-flash-chart object takes parameter file for chart & generates chart.The senddata function code:

    function senddata($wht)
    {

    //var uid = document.getElementById('uid').value;
    var total1 = uid.value+','+$wht;
    swfobject.embedSWF(
    "open-flash-chart.swf", "my_chart1", "350", "300",
    "9.0.0", "expressInstall.swf",
    {"data-file":"data_for_graph.php?q="+total1,"loading":"Loading Graph..."} );
    

    } Here created array total1[] and getting both values separate in data_for_graph.php file. rest of the things are ok.

  4. will get $unm from above.

What i want to do is, when i will click on this link(datalinechart) i should get chart through ajax(without loading page), now problem is that i have implemented successfully such functionality for pagination, i.e it works well when i give page as a url, but i don't know if i can give function as a url, i tried it but it's loading page returns 404 error page.

or any suggestion on this?
feel free for more details.
can anybody help me here, help will be greatly appreciated.
thank you.