Parsing vars to serverside script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pjotr Wedersteers

    Parsing vars to serverside script

    Hello,

    I have some Javascript embedded in a html page.
    I would like to have this snippet parse the numerical results of some
    calculations back to the server where a PHP script catches it and stores
    results in a db.

    The function I would like to include this code in:

    function resetall (e)
    {
    stop_clock ();
    score = evalscore (e);
    if (bNSC4 || bNSC6)
    { document.releas eEvents(Event.M OUSEMOVE);}
    if (ftime == 0)
    { ftime = calc_time();}
    ttime += ftime;
    num_runs += 1;
    // parse ftime, ttime and num_runs to script
    // and clear all relevant data before restart (clipped)
    } // end func resetall

    The PHP part is no problem, I just can't figure out yet how to parse data
    from within the JavaScript function.

    Anyone got some good pointers ? I probably miss something straightforward
    TIA!
    Pjotr


  • Andrew Thompson

    #2
    Re: Parsing vars to serverside script

    On Sat, 10 Jul 2004 22:19:44 +0200, Pjotr Wedersteers wrote:
    [color=blue]
    > I have some Javascript embedded in a html page.
    > I would like to have this snippet parse the numerical results of some
    > calculations back to the server where a PHP script catches it and stores
    > results in a db.[/color]

    Make a link the user can click and
    include the data in the link. E.G.

    http://www.example.com/form.php?jsdata ='blahblahblah. .'

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology

    Comment

    Working...