I''ve noticed some strangeness when using the InPlaceEditor.
Here''s my code:
<p id="storyTitle"><%= storyTitle %></p>
<script type="text/javascript">
new Ajax.InPlaceEditor(''storyTitle'',
''editBlog.jsp'', {
callback: function(value) { return
''v=edit&user=<%customerName %>&story=<%= storyID
%>&editItem=storyTitle&storyTitle='' + value.value;},
});
</script>
The problem I''m having is with the callback function. In the
examples at script.aculo.us, they show assigning parameters the
new form value by simply saying:
"param=" + value;
For some reason hhis not working for me in Firefox (1.07).
Instead I have to do:
"param=" + value.value.value;
In IE (6.0) none of these work (value, value.value,
value.value.value).
I''m stumped -- anyone see what I''m mising?
Cheers,
Brandon
________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
This is my rough guess, value is keyword on javascript.
Try to use something else as parameter and see if it works.
<p id="storyTitle"><%= storyTitle %></p>
<script type="text/javascript">
new Ajax.InPlaceEditor(''storyTitle'',
''editBlog.jsp'', {
callback: function(a) { return
''v=edit&user=<%customerName %>&story=<%= storyID
%>&editItem=storyTitle&storyTitle='' + a.value;}, });
</script>
Ricky.
Brandon Dove wrote:
>I''ve noticed some strangeness when using the InPlaceEditor.
>Here''s my code:
>
><p id="storyTitle"><%= storyTitle %></p>
>
><script type="text/javascript">
> new Ajax.InPlaceEditor(''storyTitle'',
> ''editBlog.jsp'', {
> callback: function(value) { return
''v=edit&user=<%>customerName %>&story=<%= storyID
>%>&editItem=storyTitle&storyTitle='' + value.value;},
> });
></script>
>
>The problem I''m having is with the callback function. In the
>examples at script.aculo.us, they show assigning parameters the
>new form value by simply saying:
>
>"param=" + value;
>
>For some reason hhis not working for me in Firefox (1.07).
>Instead I have to do:
>
>"param=" + value.value.value;
>
>In IE (6.0) none of these work (value, value.value,
>value.value.value).
>
>I''m stumped -- anyone see what I''m mising?
>
>Cheers,
>
>Brandon
>
>________________________________________________
>Get your own "800" number
>Voicemail, fax, email, and a lot more
>http://www.ureach.com/reg/tag
>_______________________________________________
>Rails-spinoffs mailing list
>Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
>
>
>
"value" is the name of the attribute created in the temporary form used for the in place editing. I would assume that if this was really the problem that almost everyone using this would be experiencing similar behaviour no?>This is my rough guess, value is keyword on javascript. >Try to use something else as parameter and see if it works. > ><p id="storyTitle"><%= storyTitle %></p> > ><script type="text/javascript"> > new Ajax.InPlaceEditor(''storyTitle'', ''editBlog.jsp'',{> callback: function(a) { return ''v=edit&user=<%>customerName %>&story=<%= storyID >%>&editItem=storyTitle&storyTitle='' + a.value;}, }); ></script> > >Ricky.________________________________________________ Get your own "800" number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag
I don''t think "value" is a keyword in JavaScript. On 11/22/05, Brandon Dove <bcdove-HTy/uMP4gIzQT0dZR+AlfA@public.gmane.org> wrote:> "value" is the name of the attribute created in the temporary > form used for the in place editing. I would assume that if this > was really the problem that almost everyone using this would be > experiencing similar behaviour no? > > >This is my rough guess, value is keyword on javascript. > >Try to use something else as parameter and see if it works. > > > ><p id="storyTitle"><%= storyTitle %></p> > > > ><script type="text/javascript"> > > new Ajax.InPlaceEditor(''storyTitle'', ''editBlog.jsp'', > { > > callback: function(a) { return ''v=edit&user=<%> >customerName %>&story=<%= storyID > >%>&editItem=storyTitle&storyTitle='' + a.value;}, }); > ></script> > > > >Ricky. > > > ________________________________________________ > Get your own "800" number > Voicemail, fax, email, and a lot more > http://www.ureach.com/reg/tag > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >