Jump to content

Insert PHP output into JS variable.


kirill578

Recommended Posts

In short, what you're talking about is what AJAX is:  Asynchronous Javascript and XML.

While it originally took XML from (usually) php output and worked with it on the javascript side, the term AJAX incorporates all types of returned data, including html, text, JSON, and JSONP. 

 

What was used in the above example was jQuery, a javascript framework that makes a lot of javascript, but especially AJAX pathetically easy to write and work with.  I was fumbling all over trying to learn javascript in order to do AJAX, but jQuery got me up and writing code practically overnight. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.