|
From: | Vedro |
Subject: | [help-cgicc] how access to HTML controls atributes ? |
Date: | Fri, 9 Jan 2009 09:26:38 +0100 |
Hi,
I am new to cgicc library and
I have a following problem.
I defined <select>
HTML control like this:
cgicc::select sel1 = cgicc::select();
sel1.set("name","someName").set("class","selectfield").set("SIZE","1");sel1.add(br()); sel1.add(option( "0/1").set("class","selectfield").set("value","1"));sel1.add(br());sel1.add(option( "0/2").set("class","selectfield").set("value","2"));sel1.add(br());sel1.add(option( "0/3").set("class","selectfield").set("value","3"));sel1.add(br());sel1.add(option( "0/4").set("class","selectfield").set("value","4"));sel1.add(br());I would like to access to every
embedded object (each option) inside sel1 object going through some loop,
check value of
each option object and set "selected"
atribute if needed.
I see that HTMLElement object
has HTMLElementList data which contains embedded object but it is private and
it's possible to add new object into this list only.
There is no interface which provide
accessing i.e. reading and seting different atribute inside particular
object ( in this case in "options" object inside "select" object) and I do not
understand why it's like that.
Are there any other ways to access
(and changes) atributes inside defined objects ?
Thanks in advance
V.
|
[Prev in Thread] | Current Thread | [Next in Thread] |