Php and javascript

Links for php scripts

Moderators: macek, egami, gesf

Post Reply
landi
php-forum Active User
php-forum Active User
Posts: 386
Joined: Thu Mar 15, 2012 3:59 pm

Re: Php and javascript

Post by landi » Wed Aug 06, 2014 2:50 am

Hi,
I've only used curl a couple of times and so I don't know about any tricks to call javascript, but IHMO it is unlikely since js is executed by the browser, and curl does not emulate a browser, it just retrieves data using http etc.

I'm not sure WHY you want to do this, so it is difficult to think of alternatives but assuming you are trying to print a report that you can get after selecting multiple parameters from the drop downs, then one of these ideas might help:

1) If you only need one set of values, set the drop downs manually to those values and look at the final url that is called. It's probably something like run_report.aspx?acedemic_year=2012&semester=fall. You could then use curl to call that directly.

2) Or: If you need to change the parameters, then find out where jquery is getting the values from, and get them yourself and then do (1)

3) Or: Write a php page to run the javascript and call that from the browser that is runing the page you write (maybe in an iframe).

Hope that helps
-A

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest