Welcome to WebmasterWorld Guest from 54.205.75.60

Forum Moderators: open

Message Too Old, No Replies

How to execute PHP script while reading javascript?

   
12:17 pm on Jun 10, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I have to set javascript and execute some small PHP script on another server. How to do this actually in the correct way? Are there any obstacles to do this. I assume Javascript will be enabled.
12:52 pm on Jun 10, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



If js is not enabled it will need to degrade gracefully and provide valid output or suitable error message.
1:31 pm on Jun 10, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



If js is enabled how to do it?
3:31 am on Jun 11, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Depends on what you need to do with reply from php script. If you are not interested in reply. then using small scripts url as source of hidden iframe will suffice(no js required).

Otherwise as server is probably on different domain then containing page, Ajax with jsonp or similar needed.