_maarten Posted December 29, 2010 Share Posted December 29, 2010 Hi, I'm new to ajax and I'm trying to make an application with Zend framework. What I want to do is the following: I have 2 boxes with information, each with an edit button. I want to be able to edit those boxes on the same page, and I want to use overlay forms (so I'm probably going to use dijit / dojo) The way I see it is that I just generate the forms on that page, and use javascript to make them popup, the form itself does a submit to a controller that return a status code. When the status code is ok, the overlay closes, and I want the box to reload the information from the database. I was planning on making a controller that outputs data in XML (or another format) and have Javascript construct my content (lets say in this case a user table) and upon form submission I would then to an .innerHTML = function_that_fetches_xml_and_generates_table; Is this a good idea or is this a bad way of using javascript / ajax? Quote Link to comment https://forums.phpfreaks.com/topic/222891-new-to-ajax/ Share on other sites More sharing options...
trq Posted December 29, 2010 Share Posted December 29, 2010 That is the general gist of what can be done with Ajax. Personally I would use jQuery as my Js framework and json (instead of xml) as my data type. Quote Link to comment https://forums.phpfreaks.com/topic/222891-new-to-ajax/#findComment-1152511 Share on other sites More sharing options...
_maarten Posted December 29, 2010 Author Share Posted December 29, 2010 Hi, Thanks for your reply ! I looked it up and I'll indeed be using Zend_JSON .. thanks! My preference also goes to jQuery , but I was thinking that it would be easier to use the Dojo library that comes with the Zend framework, or is that not advisable ? Quote Link to comment https://forums.phpfreaks.com/topic/222891-new-to-ajax/#findComment-1152531 Share on other sites More sharing options...
trq Posted December 29, 2010 Share Posted December 29, 2010 If your preference is with jQuery I'd stick with that. I don't use Zend that often but I've never bothered with it's Dojo stuff, it's just not needed IMO. Quote Link to comment https://forums.phpfreaks.com/topic/222891-new-to-ajax/#findComment-1152543 Share on other sites More sharing options...
the182guy Posted December 29, 2010 Share Posted December 29, 2010 You don't even need the Zend JSON implementation, all you need is json_encode() and json_decode() Quote Link to comment https://forums.phpfreaks.com/topic/222891-new-to-ajax/#findComment-1152605 Share on other sites More sharing options...
_maarten Posted December 30, 2010 Author Share Posted December 30, 2010 You don't even need the Zend JSON implementation, all you need is json_encode() and json_decode() thanks, I found that too yesterday and it's working nicely! Quote Link to comment https://forums.phpfreaks.com/topic/222891-new-to-ajax/#findComment-1152905 Share on other sites More sharing options...
Kathleen7Ward Posted December 31, 2010 Share Posted December 31, 2010 I am here to know about... how to start ajax application?? i am working in PHP but i have no idea about Ajax... Quote Link to comment https://forums.phpfreaks.com/topic/222891-new-to-ajax/#findComment-1153254 Share on other sites More sharing options...
_maarten Posted December 31, 2010 Author Share Posted December 31, 2010 I am here to know about... how to start ajax application?? i am working in PHP but i have no idea about Ajax... so you're in my shoes then? what do you want to make with ajax? Quote Link to comment https://forums.phpfreaks.com/topic/222891-new-to-ajax/#findComment-1153291 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.