Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: CGI::Ajax vs javascript global var

by varian (Chaplain)
on Aug 24, 2007 at 19:28 UTC ( [id://634941]=note: print w/replies, xml ) Need Help??


in reply to CGI::Ajax vs javascript global var

$pjx = new CGI::Ajax ('func','\&func');
does not pass the Perl code reference properly, it should read:
$pjx = new CGI::Ajax ('func' => \&func);
otherwise the Perl call server side fails.

You may want to have a look at one of the CGI::Ajax examples that come with the module.

Replies are listed 'Best First'.
Re^2: CGI::Ajax vs javascript global var
by senget76 (Acolyte) on Aug 29, 2007 at 01:50 UTC
    opps.. my mistake in the sample
    but in my code it has the correct syntax
    $pjx = new CGI::Ajax ('func' => \&func);

    coz it execute seccussfuly, on the first time but in second time, it complains about javascript "previous_value"

    my code is pretty long, so, I made a simplified version
    I tried it several time but ended up using workaround using
    hidden input to keep the previous value

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://634941]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-16 20:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found