Thanks Justin,
that does work perfectly, I changed after reading your dire warning.
I didn't know about the "._controls.editor" bit,
of course now they all say "spicy pepper"... I'll just tell 'em it's a
feature ;-)
On Jan 15, 3:54 pm, "Justin Perkins" <[EMAIL PROTECTED]> wrote:
> On Jan 15, 2008 5:45 PM, Andy Koch <[EMAIL PROTECTED]> wrote:
>
>
>
> > I did try the onFormCustomization, however it behaved the same way.
>
> What version of Scriptaculous are you using (see your scriptaculous.js
> file). You should be using 1.8.0 or higher.
>
> I tested onFormCustomization shortly after I sent the previous email
> and it worked as expected.
>
> You *do not* want to use onEnterEditMode with a timeout.
> onEnterEditMode is fired *before* the form and it's controls are
> created, so your timeout is just luckily working for you, but that
> doesn't mean it will work all the time.
>
> onFormCustomization was created for your exact needs, it should work
> fine. If not, then use loadTextURL.
>
> Here is an example usage, which works (I tested it):
>
> <span id="customize-me">Spicy Pepper</span>
> <script type="text/javascript">new Ajax.InPlaceEditor( 'customize-me',
> '/some/url', { onFormCustomization: function( ipe, ipeForm){
> ipe._controls.editor.value = "Spicy Pepper" } } );</script>
>
> -justin
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---