polomasta
2008-Jan-31 00:48 UTC
Ajax.InPlaceEditor via PHP via prototype widows class = HELP :-)
my window comes up fine and builds a page from some PHP which is all kosher. this is what the source of the "window" looks like: ----------------------------------------------------------------------------------------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script type="text/javascript" src="scripts/functions.js"></script> <script type="text/javascript" src="scripts/prototype.js"></script> <script type="text/javascript" src="scripts/scriptaculous.js"></ script> <script type="text/javascript" src="scripts/window.js"></script> </head> <body> <style type="text/css" media="screen">.inplaceeditor-saving { background: url(images/loader.gif) bottom right no-repeat; }</style> <div class="windowDiv" id="notes">My Notes: <p id="editNote"> Click to edit Notes</p> <script type="text/javascript"> new Ajax.InPlaceEditor(''editNotes'', ''saveNotes.php'', {rows: 10,cols: 40}); </script></div> </body> </html> -------------------------------------------------------------------- when I click, nothing happens!! In, IE, when I click the button that creates the window I am getting " Line: 389, Error: Object Required" after adding the code for the in place editor... everything worked smooth before on IE/Safari browsers Any ideas? On a separate note, while the window is created fine on IE/Safari, in Firefox it just creates the window <iframe> at the top of my page with no styles whatsoever.. so if you have thoughts on that I would appreciate it!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Christophe Porteneuve
2008-Jan-31 07:40 UTC
Re: Ajax.InPlaceEditor via PHP via prototype widows class = HELP :-)
Your element has id="notes", not id="editNotes". Check your Firebug console (or your JavaScript console) for a JS error. -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Brian Williams
2008-Jan-31 14:19 UTC
Re: Ajax.InPlaceEditor via PHP via prototype widows class = HELP :-)
that or he''s aiming for the P with id of editNote but still definitely a typo in there On Thu, Jan 31, 2008 at 2:40 AM, Christophe Porteneuve <tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> > Your element has id="notes", not id="editNotes". Check your Firebug > console (or your JavaScript console) for a JS error. > > -- > Christophe Porteneuve aka TDD > tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
polomasta
2008-Jan-31 15:01 UTC
Re: Ajax.InPlaceEditor via PHP via prototype widows class = HELP :-)
ahhhhhhhhhhhhh typos... everything is always so simple. Thanks for the proof read!! On Jan 31, 8:19 am, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> that or he''s aiming for the P with id of editNote > > but still definitely a typo in there > > On Thu, Jan 31, 2008 at 2:40 AM, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> > wrote: > > > > > Your element has id="notes", not id="editNotes". Check your Firebug > > console (or your JavaScript console) for a JS error. > > > -- > > Christophe Porteneuve aka TDD > > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
polomasta
2008-Jan-31 15:58 UTC
Re: Ajax.InPlaceEditor via PHP via prototype widows class = HELP :-)
Okay, new question.... I''ve got the inplace editor working for the most part but now I''m having issues saving info to my DB and displaying the new text. My editor script now looks as follows: <script type=\"text/javascript\"> new Ajax.InPlaceEditor(''editNote'', ''saveNotes.php'', {rows: 5,cols:40, callback: function(form, value){return ''id=".$mainID."&content='' + escape(value) +\"&\"}});</script></div>\n"); when I look at the post request in fire bug I see this: id=18596417tb&content=another%20notes%20test&editorId=editNote saveNotes.php is looking for the id=SomeID and content=SomeContent if I put saveNotes.php?id=18596417tb&content=another%20notes %20test&editorId=editNote in my browser it updates the DB just fine However, from the in place editor it is not updating the db nor is is displaying the text I entered.. any ideas/suggestions? THANKS! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Walter Lee Davis
2008-Jan-31 16:09 UTC
Re: Ajax.InPlaceEditor via PHP via prototype widows class = HELP :-)
On Jan 31, 2008, at 10:58 AM, polomasta wrote:> > Okay, new question.... > [snip] > > However, from the in place editor it is not updating the db nor is is > displaying the text I entered.. any ideas/suggestions? THANKS! >Is your form handler (php) set to accept POST or GET? The IPE sends by POST, unless you configure it otherwise in the parameters. Try using the $_REQUEST superglobal in PHP which grabs GET and POST in one whack. Also, do you have Firebug enabled? That''s the best way I have found to see what''s going on in these XHR transactions. You can see the raw post, the responseText, even the headers sent. Finally, do you have your PHP script set to print or echo the results? Walter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
polomasta
2008-Jan-31 16:46 UTC
Re: Ajax.InPlaceEditor via PHP via prototype widows class = HELP :-)
Walter, thanks for the tips!! Got it working :-) My last hurdle and then the world will be perfect.... as I mentioned in my original post, the window from prototype window class is popping up beautifully in safari and IE, however in Firefox its just putting the <iframe> at the top of the page without any styles applied. Has anyone else run into this? solutions? Thanks again for all the help! On Jan 31, 10:09 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> On Jan 31, 2008, at 10:58 AM, polomasta wrote: > > > > > Okay, new question.... > > [snip] > > > However, from the in place editor it is not updating the db nor is is > > displaying the text I entered.. any ideas/suggestions? THANKS! > > Is your form handler (php) set to accept POST or GET? The IPE sends > by POST, unless you configure it otherwise in the parameters. Try > using the $_REQUEST superglobal in PHP which grabs GET and POST in > one whack. > > Also, do you have Firebug enabled? That''s the best way I have found > to see what''s going on in these XHR transactions. You can see the raw > post, the responseText, even the headers sent. > > Finally, do you have your PHP script set to print or echo the results? > > Walter--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
polomasta
2008-Feb-01 13:55 UTC
Re: Ajax.InPlaceEditor via PHP via prototype widows class = HELP :-)
turns out this firefox problem only occurs in the windows version... any ideas anyone? On Jan 31, 10:46 am, polomasta <bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote:> Walter, thanks for the tips!! Got it working :-) > > My last hurdle and then the world will be perfect.... as I mentioned > in my original post, the window from prototype window class is popping > up beautifully in safari and IE, however in Firefox its just putting > the <iframe> at the top of the page without any styles applied. > > Has anyone else run into this? solutions? > > Thanks again for all the help! > > On Jan 31, 10:09 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > > > On Jan 31, 2008, at 10:58 AM, polomasta wrote: > > > > Okay, new question.... > > > [snip] > > > > However, from the in place editor it is not updating the db nor is is > > > displaying the text I entered.. any ideas/suggestions? THANKS! > > > Is your form handler (php) set to accept POST or GET? The IPE sends > > by POST, unless you configure it otherwise in the parameters. Try > > using the $_REQUEST superglobal in PHP which grabs GET and POST in > > one whack. > > > Also, do you have Firebug enabled? That''s the best way I have found > > to see what''s going on in these XHR transactions. You can see the raw > > post, the responseText, even the headers sent. > > > Finally, do you have your PHP script set to print or echo the results? > > > Walter--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---