If you''re running 1.6, Element#identify is what you need (http://
www.prototypejs.org/api/element/identify).
Best,
Tobie
On Dec 5, 6:10 pm, Scott Phillips
<drbigfr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I have the following html on my page:
>
> [the number portion changes i.e. item_5, item_6, etc..]
> <li id="item_5">
> MAIN TITLE HERE
> <div id="msg_5"></div>
> <div id="info5" style="display: none" >
> <span class="description">Description goes
here</span>
> </div>
> </li>
>
> Then I am calling my function when you drag the LIs around:
>
> function updateOrder()
> {
>
> var params = {
> method : ''post'',
> parameters : Sortable.serialize(''itemlist''),
> onLoading: function(){$(''msg'').show()}, // optional
> onLoaded: function(){$(''msg'').hide()} // optional};
>
> new
Ajax.Updater(''notice'',''/ajax/reorder.php'',
params);
> // if you are using the WHERE statement uncomment the line below and
> comment the line above
> //new Ajax.Request(''processor.php<? //echo
$_GET[''cat'']; ?>'', params);
>
> }
>
> Now what I can''t figure out, is how can I change it so that
> ''onLoading:
function(){$(''msg'').show()}'' will update the specific
div,
> as opposed to the general one. In other words, I would love for it to
> be:
>
> onLoading: function(){$(''msg'' + ''_'' +
[ID#_OF_DIV]).show()}
>
> But I can''t figure out how to pull the number out. Any help is
greatly
> appreciated. Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---