Welcome to WebmasterWorld Guest from 54.234.153.208

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)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Oct 25, 2006
posts: 998
votes: 0


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 June 10, 2012 (gmt 0)

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


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

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Oct 25, 2006
posts: 998
votes: 0


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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 3, 2005
posts:1585
votes: 0


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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members