Hello
Unfortunately  it doesn't work:
$$('div.item_content').invoke('insert', {bottom: '<input
type="checkbox" class="compare_itm" onclick="Itm.Click(\''+
this.getAttribute('sale_num') +'\')" />' });

The script fails if I put this.getAttribute('sale_num')



On Aug 27, 6:55 pm, Walter Lee Davis <wa...@wdstudio.com> wrote:
> You could get the value inside your iterator by looking at:
>
> this.getAttribute('sale_num')
>
> Inside of an invoke iterator, 'this' is set to the current object of  
> affection.
>
> Don't forget to give your generated checkbox an ID or name or  
> something else based on this value you get, so your checkboxes will  
> tell a story to your compare script!
>
> Walter
>
> On Aug 27, 2010, at 9:01 AM, elivol wrote:
>
> > Hello.
> > I have this HTML code:
> > <div class="item_content" sale_num="12345">some stuff</div>
> > <div class="item_content" sale_num="123456">some stuff</div>
>
> > I need to insert a checkbox into div "item_content" with value of
> > "sale_num" attribute.
> > I'm trying to do it with:
> > $$('div.item_content').invoke('insert', {bottom: '<input
> > type="checkbox" class="compare_itm" value="????????" />' });
>
> > but i have no idea how to continue.
> > thanks in advance.
>
> > --
> > You received this message because you are subscribed to the Google  
> > Groups "Prototype & script.aculo.us" group.
> > To post to this group, send email to 
> > prototype-scriptaculous@googlegroups.com
> > .
> > To unsubscribe from this group, send email to 
> > prototype-scriptaculous+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group 
> > athttp://groups.google.com/group/prototype-scriptaculous?hl=en
> > .

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to