[Proto-Scripty] Re: Creating Ajax.InPlaceEditor dynamically ... confusing the hell out of me.

2009-03-01 Thread BearState


Never mind!

What I found is that the fix I put in for the 'onSuccess' in
Ajax.Request() still did not satisfactorilly allow time to return the
value from the CGI.  Thought it did, but it didn't.   Refer to the
thread on 'Delay Required after Ajax.Request() ... How to?' for more
info.

I went back to using setTimeout() on the split part of the function
and was then able to get the editor working.

BearState


On Mar 1, 11:36 am, BearState wixelb...@yahoo.com wrote:
 Hello again ...

 I want to thank the folks in this group.  It's a good sounding board
 to keep from bashing away for hours on end.  Nice quick responses from
 here have helped, especially while my head's been fogged over with the
 flu.

 Thanks.

 New Problem ...

 I have been able to successfully load up Ajax.InPlaceEditor objects
 and have them work during the load of my page using observe
 (DOM:LOAD).

 No problem.

 But I want to cure the problem of having multiple editors on my page.
 I want to create the editor on the fly and thus, solve two problems.
 1)  Only one editor object at any one time and 2) If I create a new
 object and insert it into the page, I can create an editor for it.

 But ... ( the awful 'but' )

 I can't for the life of me, get the damn thing to work.

 I create divs for the controls ...

 div id='edClick' /div
 div
 script id='edAjax' language=javascript!--
 //--/script
 /divBR

 Then I have a function to put the editor in play ...

 function editIT() {

     \$\(edClick).replace(A HREF='#' id='editThis'editThis/A);

     var theEditor =  var newEditor = new Ajax.InPlaceEditor
 ('theText'', 'thescript.cgi', +
                      { rows:10,cols:100,textBetweenControls:'  ', +
                      okControl:'link', +
                      externalControlOnly:true,
 externalControl:'editThis', +
                      callback: function(form, value) { return \
 \theID=1value=\\ +escape(value) } +
                      } );;

     \$\(edAjax).replace(theEditor);
     \$\(edClick).click();

 }

 No Go.

 I've tried just doing the new Ajad.InplaceEditor() in the function,
 out of it, here, there, everywhere, but No Go.

 What am I doin wrong?

 BearState
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Creating Ajax.InPlaceEditor dynamically ... confusing the hell out of me.

2009-03-01 Thread Quleczka

 What I found is that the fix I put in for the 'onSuccess' in
 Ajax.Request() still did not satisfactorilly allow time to return the
 value from the CGI.  Thought it did, but it didn't.

Maybe some example what exactly is not working for you in this
'onSuccess' callback?

Quleczka
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---