Repeater Posted September 16, 2009 Report Share Posted September 16, 2009 I want to use the results from a SELECT on my database in my Javascript code. I realize I am trying to transcend the Client / Server domain exclusivity thing. At the moment, I succeed in fetching my data and echoing it (server side). This is OK. NOW, is there a trick to getting my record data into my calling JAVASCRIPT code so I can do some work with it using Javascript? Thanks very much. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted September 16, 2009 Report Share Posted September 16, 2009 I would probably look into some AJAX for this sort of thing. I personally would suggest looking at jQuery's ajax functionality (here's a basic screencast, I'm sure you can find others too with a web search or two: http://blog.themeforest.net/tutorials/jquery-for-absolute-beginners-day-13/) I'm sure it can also be done with other methods, using a different Javascript framework, or no framework at all, but I suggest jQuery for the ease of use. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted September 16, 2009 Report Share Posted September 16, 2009 Also, Stefan recently put out a course on jQuery that includes some videos on working with PHP and AJAX. You do have to pay for the course, whereas the other link is free, but it may be worth a look. http://www.killerjavascript.com/beginners-jquery/ Quote Link to comment Share on other sites More sharing options...
BeeDev Posted September 16, 2009 Report Share Posted September 16, 2009 (edited) If you can echo the data from the database, then just echo it into a You may need to code it like: just to give you an idea. Edited September 16, 2009 by BeeDev 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.
Note: Your post will require moderator approval before it will be visible.