[Javascript] help needed badly

Iztok Polanic iztok.polanic at amis.net
Mon Dec 20 05:48:37 CST 2004


Hi!

After a bit of analysing the problem I found out that IE was complaning 
about 'server threw an exception'. How to fix this? I'm using PHP & Apache.

Bye,

Iztok

Hakan M (Backbase) wrote:
> The Option constructor? I'm wondering how this can work in Firefox. What 
> you want to do is create a new element of type 'option' and append it to 
> your selectbox.
> 
> var objSlike = opener.document.forms[0].elements['slike'];
> var oOption = document.createElement('option');
> oOption.setAttribute('value', 'theValueGoesHere');
> var oOptionContents = document.createTextNode('theTextContentGoesHere');
> oOption.appendChild(oOptionContents);
> objSlike.appendChild(oOption);
> 
> Hope this helps.
> 
> Regards,
> H
> 
> Iztok Polanic wrote:
> 
>> Hi!
>>
>> What am I dong wrong? This script works in Firefox 1.0, but IE (6.0 
>> SP2) crashes!!!
>>
>> var objSlike = opener.document.forms[0].slike;
>> objSlike.options[0] = new Option('bla','bla');
>>
>> Bye,
>>
>> Iztok
>> _______________________________________________
>> Javascript mailing list
>> Javascript at LaTech.edu
>> https://lists.LaTech.edu/mailman/listinfo/javascript
>>
>>
> 



More information about the Javascript mailing list