Use the update method for this:

new Element('option', { value: 'blah'}).update('text here');

Best,
Thomas

Am 26.07.2007 um 12:44 schrieb Andriy Mykhaylyuk:

>
> Also I've tried to use it to create new "h" elements and looks like
> when I'm passing innerHTML property to method it works fine for IE and
> for Firefox innerHTML is empty
>
> On Jul 25, 10:49 pm, Matt <[EMAIL PROTECTED]> wrote:
>> Hey Andriy,
>>
>>          That would be because it needs an "innerHTML" property, IE
>> compensates for this by just using the value in the "value"
>> property.
>>
>> Also your example has a syntax error, there is no closing quote on
>> "value".  You could try this
>>
>> new Element("option", {
>>                               value : "value",
>>                              innerHTML : "Hi there"
>>                            })
>>
>> On Jul 25, 11:41 am, Andriy Mykhaylyuk <[EMAIL PROTECTED]> wrote:
>>
>>> I've tried to create new options for select element via
>>> var el = new Element("option", {
>>>                               value : "value,
>>>                               text : "text here"
>>>                            })
>>
>>> it works fine for IE, but  in Firefox text attribute of created  
>>> option
>>> is empty.
>>> Just to let you know :)
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
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