php - Run/Execute CasperJS script by clicking a button on webpage -
i have casperjs script returns json when run on commandline. want have arrangement such 1) create webpage 2) on clicking button on webpage casperjs scripts gets executed @ server side , post/return result webpage.
how can same.
edit: invoking ajax process written in php on clicking buttom. php script contains echo exec('casperjs sample.js');
returned nothing on checking webserver error log got error
'casperjs' not recognized internal or external command, operable program or batch file.
ps: running absolutely fine via commandline.
edit2
changed php script to:
echo exec('c:\casperjs\batchbin\casperjs .\sample.js');
error got modified :
'phantonjs' not recognized internal or external command, operable program or batch file.
i have found solution post on google group
https://groups.google.com/forum/#!topic/casperjs/7lps6tix-78
it worked moving casperjs & phantomjs executable file in directory server (/html)
Comments
Post a Comment