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

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

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4463561 posted 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

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4463561 posted 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

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4463561 posted 1:31 pm on Jun 10, 2012 (gmt 0)

If js is enabled how to do it?

daveVk

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4463561 posted 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