aha of course...thanks....unfortunately it doesnt seem to work....i
get an alert back every time i click but its always undefined....i've
posted it in the context of the rest of my code just in case something
else might be causing the problem....the bit directly concerned is at
the bottom

document.observe("dom:loaded", function() {
    var forms = $$('select');
    var container = $('container');
    forms.each(function(select, index) {
        select.hide();
        var ul = new Element('ul', { id: 'list_' + (index +1) +
'_body'});
        var options = select.select("option");
        options.each(function(option) {
            var li = new Element('li');
            var anchor = new Element('a', {class:
'listelement'}).update(option.innerHTML);
            li.appendChild(anchor);
                ul.appendChild(li);
                container.appendChild(ul);
        });
    var aTag = new Element('a', { id: 'list_' + (index +1), class:
'selectelement', href:'#' }).update('select...');
    container.appendChild(aTag);
    })

     document.observe("click", function(itt) {
     alert(itt.innerHTML);
    })

})





On Jan 24, 11:29 pm, kangax <[EMAIL PROTECTED]> wrote:
> "this" is a keyword, it can not be used as a function argument. Choose
> any other valid name and you'll be just fine.
>
> - kangax
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to