the 7th Hokage Posted July 25, 2009 Share Posted July 25, 2009 I've been working on a browser based web game for people to play. i am 80% done. The site was done in PHP and I am to the point where i need to make a connection between client and server side languages. my problem is this. I have a page where i need output printed to the page without it refreshing, but that's not the main thing. I am using PHP objects loaded with data from the server, this cuts down on loading time for me I want to keep this objectivity. "however" i used javascript to update the page by adding text nodes. My problem with that is i can't call php functions in jscript. I was told this could be done by AJAX(call php functions from the ajax language). I have no idea how to proceed with doing what i need after reading serveral articles and a few tutorials on AJAX. I get the basics but honestly I'm just a bit lost.. i have included pictures so you can understand what i mean. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
lonewolf217 Posted July 25, 2009 Share Posted July 25, 2009 your best bet is to download jQuery and to use that. the basics of what you would have then, is a front end page with your javascript and a few empty divs. you would also have a backend page with all of your php code. your jquery would take input from the main page, send it to the backend which would then output data in the divs without ever having to refresh jQuery seems complicated to use at first, but once you get used to it, its extremely powerful Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.