Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

How to get list of options from HTMLSelectElementClass?
Ok, maybe I'm doing this all wrong, but the subject pretty asks what I
think I need to know.

I am trying to grab all of the options from an HTML "select" control,
and then display them in a combo box.

I'm reading the HTML document using a AxSHDocVw.AxWebBrowser, but I
don't think that really matters...

To work with a select control, I can get the element (of type
"HTMLSelectElementClass") from the current document and I see that
there is a property called ".options" attached to it, but apparently
it's not really a collection of "options" objects - that would be too
easy.  It actually seems to be another copy of the select object...
who wrote these classes??

Anyway.  I can successfully get the length of the
HTMLSelectElementClass which matches the actual number of options(with
the .length property), which leads me to believe that I should be able
to somehow iterate through all the options, but unfortunately that
doesn't seem to be the case in practise - at least I can't figure out
how to do it without writing something that parses through the
"innerHTML".

Any hints?

Report this thread to moderator Post Follow-up to this message
Old Post
Mark MacRae
11-18-04 08:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

C# archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:55 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.