Sherman L. Cahal wrote:> In the code --
> "new Ajax.InPlaceEditor(''id'',
''url'', { callback: function(form, value)
> { return ''myparam='' + escape(value) }})"
>
> I implemented a variant --
> "<span
id=''history''>".$history."</span>"
>
> Followed by the javascript --
> "new Ajax.InPlaceEditor(''history'',
''urlsnipped?catid=$catid'',
> {rows:15,cols:80,callback: function(form, value) { return
''myparam='' +
> escape(value) } });"
>
> On the following page where the data is being sent to, I am receiving
> the $catid variable using $_GET. I am unsure how to pass the edited
> text within the implementation so that I can update the history
> variable to the database.
>
> Any pointers would be helpful, thanks!
> Sherman
I finally figured it out after a good night''s sleep and some digging
around on the former forum.
echo "<script type=''text/javascript''>";
echo "new Ajax.InPlaceEditor(''history'',
''/includes/mod_categories/admin/page_mod_history.php'', {
ajaxOptions: {method: ''get''},
rows:10,
cols:90,
callback: function(form, value) { return
''catid=".$catid."&history='' + value},
onBlur: function(request) {Element.show(''indicator'')},
onComplete: function(request)
{Element.hide(''indicator'')}});";
echo "</script>";
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---