Dynamic Options in HTML-Forms 
Author Message
 Dynamic Options in HTML-Forms

Hey guys,

has anyone heard from problems when assigning
"Option"-objects to a HTML-Form select-field?
example:

     var myOption = new Option ("myTest","99", false, false)
     top.neighbourhood.document.f1.sup.options[0] = myOption

There is a strange behaviour:

      top.neighbourhood.document.f1.testtest.options[1].text = "myTest"
      top.neighbourhood.document.f1.testtest.options[1].value = "99"

works absolutely correct ....
and btw  upper code segment works for well for another frame
;-(?????....

(I'm working with IE 5.00.2919.xxx.)

Did anyone have similar problems?
What is the solution to that problem?

Any help would be greatly appreciated,

(Please make cc to

Thanks!!

Claus Eikemeier
mcm institute
University of St. Gallen



Sat, 02 Nov 2002 03:00:00 GMT  
 Dynamic Options in HTML-Forms
I think IE has some problems to create an Option in one window and
insert it into another window. So do
  var opt = new parent.frameName.Option(...)
if you want to insert the option into another frame's document

Quote:

> Hey guys,

> has anyone heard from problems when assigning
> "Option"-objects to a HTML-Form select-field?
> example:

>      var myOption = new Option ("myTest","99", false, false)
>      top.neighbourhood.document.f1.sup.options[0] = myOption

> There is a strange behaviour:

>       top.neighbourhood.document.f1.testtest.options[1].text = "myTest"
>       top.neighbourhood.document.f1.testtest.options[1].value = "99"

> works absolutely correct ....
> and btw  upper code segment works for well for another frame
> ;-(?????....

> (I'm working with IE 5.00.2919.xxx.)

> Did anyone have similar problems?
> What is the solution to that problem?

> Any help would be greatly appreciated,

> (Please make cc to

> Thanks!!

> Claus Eikemeier
> mcm institute
> University of St. Gallen

--

        Martin Honnen
        http://javascript.faqts.com/
        http://home.t-online.de/home/martin.honnen/jsgoddies.html



Sat, 02 Nov 2002 03:00:00 GMT  
 Dynamic Options in HTML-Forms
Hi Claus

Similar questions have already been asked and answered in this newsgroup,
but I couldn't find them. Somewhere among the KB articles at Microsoft you
should find one that says you cannot create Options across frames in IE5,
at least the way you're trying to. It was possible in IE's earlier
versions, but it isn't anymore.

Try to find the article for an acceptable explanation and, as a workaround,
place a function in the select-field's document to create the options. Then
call it from the frame you want to, passing the proper arguments.

Hope this helps.
Klaus

Quote:

> Hey guys,

> has anyone heard from problems when assigning "Option"-objects to a
> HTML-Form select-field?
> example:

>      var myOption = new Option ("myTest","99", false, false)
>      top.neighbourhood.document.f1.sup.options[0] = myOption

> There is a strange behaviour:

>       top.neighbourhood.document.f1.testtest.options[1].text = "myTest"
>       top.neighbourhood.document.f1.testtest.options[1].value = "99"

> works absolutely correct ....
> and btw  upper code segment works for well for another frame
> ;-(?????....

> (I'm working with IE 5.00.2919.xxx.)

> Did anyone have similar problems?
> What is the solution to that problem?

> Any help would be greatly appreciated,

> (Please make cc to

> Thanks!!

> Claus Eikemeier
> mcm institute
> University of St. Gallen



Sat, 02 Nov 2002 03:00:00 GMT  
 Dynamic Options in HTML-Forms
Q237831 - PRB: Problem Adding New Option to Select Box in Another Frame in Internet Explorer 5
http://support.microsoft.com/support/kb/articles/Q237/8/31.ASP

--
Michael Harris
MVP Scripting



Hi Claus

Similar questions have already been asked and answered in this newsgroup,
but I couldn't find them. Somewhere among the KB articles at Microsoft you
should find one that says you cannot create Options across frames in IE5,
at least the way you're trying to. It was possible in IE's earlier
versions, but it isn't anymore.

Try to find the article for an acceptable explanation and, as a workaround,
place a function in the select-field's document to create the options. Then
call it from the frame you want to, passing the proper arguments.

Hope this helps.
Klaus

Quote:

> Hey guys,

> has anyone heard from problems when assigning "Option"-objects to a
> HTML-Form select-field?
> example:

>      var myOption = new Option ("myTest","99", false, false)
>      top.neighbourhood.document.f1.sup.options[0] = myOption

> There is a strange behaviour:

>       top.neighbourhood.document.f1.testtest.options[1].text = "myTest"
>       top.neighbourhood.document.f1.testtest.options[1].value = "99"

> works absolutely correct ....
> and btw  upper code segment works for well for another frame
> ;-(?????....

> (I'm working with IE 5.00.2919.xxx.)

> Did anyone have similar problems?
> What is the solution to that problem?

> Any help would be greatly appreciated,

> (Please make cc to

> Thanks!!

> Claus Eikemeier
> mcm institute
> University of St. Gallen



Sat, 02 Nov 2002 03:00:00 GMT  
 Dynamic Options in HTML-Forms
Thanks a lot,
(especially Martin, Klaus and Michael!)

I have tried the hints and indeed they work!

The solution seems a little bit strange to me,
but nevertheless it's ok ;-)
(and btw it costs me "only" 1,5 days .... :-((

Thanks again,

Claus



Sun, 03 Nov 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. dynamic forms inside dynamic tables

2. dynamic option values

3. SELECT / Dynamic OPTIONS Netscape Sizing Issue

4. dynamic option values

5. Dynamic Option List - Spanning Difficulties

6. Dynamic adding options to <select> element

7. Linking Form Objects in HTML to other Form Objects using VBScript

8. Disabled <OPTION> in HTML Listbox

9. URGENT: changing HTML SELECT OPTIONs with VBScript

10. Usering script to display the contents(text,value) of the option of a html listbox

11. changing HTML SELECT OPTIONs with VBScript

12. VbScript / html dynamic web tree

 

 
Powered by phpBB® Forum Software