[Proto-Scripty] Re: How to use php functions return value in prototype.js

2010-03-18 Thread Zahid
thanks to all your answers. I want to intercept the response which is coming from the php script before it get displayed to front end. I am using the below function ,the php script sends the response like added to favorite..which get displayed to front end as it is...is there any way i can format

[Proto-Scripty] Re: How to use php functions return value in prototype.js

2010-03-18 Thread T.J. Crowder
Hi, ...is there any way i can format the output before it get displayed ? Yes. Instead of Ajax.Updater, use Ajax.Request and then do the update yourself: function addToFavorite(quizSeq , userSeq) {   new Ajax.Request('/my/user-quizzes/processRequest',     {       method:'get',      

[Proto-Scripty] Re: How to use php functions return value in prototype.js

2010-03-16 Thread Zahid
Hi HTH, Thanks for the prompt reply .. my issue is solved . But is there a way i can use the existing file of functions so that i dont have to make another file for ajax? On Mar 15, 10:10 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Write your PHP page to *only* output what you want

[Proto-Scripty] Re: How to use php functions return value in prototype.js

2010-03-15 Thread T.J. Crowder
Hi, Write your PHP page to *only* output what you want to receive. So for instance: ?php echo only what you want here ? Anything you output from PHP will be received by the client-side stuff (this is a Good Thing[tm]), but that just means you need to make sure your PHP is returning only what