homepage Welcome to WebmasterWorld Guest from 54.161.247.22
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
How to execute PHP script while reading javascript?
toplisek




msg:4463563
 12:17 pm on Jun 10, 2012 (gmt 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.

 

g1smd




msg:4463570
 12:52 pm on Jun 10, 2012 (gmt 0)

If js is not enabled it will need to degrade gracefully and provide valid output or suitable error message.

toplisek




msg:4463576
 1:31 pm on Jun 10, 2012 (gmt 0)

If js is enabled how to do it?

daveVk




msg:4463777
 3:31 am on Jun 11, 2012 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved