i solved part of the Textarea problem - that of changing/disappearing
text. You have to explicitly update the 'value' and 'defaultValue'
properties of the textarea to prevent the InPlaceEditor control from
clearing it out.
it would seem sensible to me, then, to wait for an 'ok on save' from
your server, and then just set these two variables locally on the
form. i'll try that.
not sure how to deal with 'not authorized' or 'not logged-in' type of
error messages yet. is that part of one of these frameworks? like, do
I need a parallel server-side infrastructure to handle just AJAX
requests? and then, do i need to start sending 403s or whatever the
'not auth' responses are, as opposed to just sending a '200 ok', and
then sending back some structured - one, a flag for success or
failure, two, a possible error message, three some actual data?
what else?
On Mar 16, 12:49 pm, "Peter2" <[EMAIL PROTECTED]> wrote:
> yes, that's part of what i mean, but the more important part is that
> i
> want to _start with_ a textarea. that is, i want a TEXTAREA on my
> screen
> - not a one-line INPUT element. here is my code:
>
> <textarea id="editme" rows="5" cols="50">This is what is in the box
> already.</textarea>
>
> <script type="text/javascript">
> new Ajax.InPlaceEditor('editme', '/ajaxWaitReturn.php',
> {rows:5,cols:50});
> </script>
>
> The 'ajaxWaitReturn.php' script just sleeps 5 seconds, then ends. So,
> taking easy things first, there never is a 'Saving...' message -
> whether
> I use a 'wait/spinning' icon or not. Is this normal? A bug?
>
> (didn't realize this forum was the same as the google group sort of.)
>
> On Mar 16, 9:39 am, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
>
> > On Mar 16, 2007, at 11:14 AM, Peter2 wrote:
>
> > > when i use a TEXTAREA with in-place-editor, all sorts of weird stuff
> > > happens - like it disappears, or the callbacks don't work, the 'wait'
> > > indicator stops working after the first save, i never get a 'Save...'
> > > message, etc. is this all from using a TEXTAREA as opposed to a P tag?
>
> > Not sure what you mean here. Do you mean if you set the editor to use
> > columns and rows, rather than letting it default to a single-line
> > (input type=text) you get different behavior? I haven't seen that
> > personally, and I have used both types of IPE.
>
> > > also, is there a non-hack way to not pre-select all the text in the
> > > textarea?
>
> > There was a long discussion of this recently on this list. Please have
> > a search of the archives.
>
> > 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 [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
-~----------~----~----~----~------~----~------~--~---