how access to HTML controls atributes ?

View: New views
1 Messages — Rating Filter:   Alert me  

how access to HTML controls atributes ?

by Vedro :: Rate this Message:

| View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
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.
 

_______________________________________________
help-cgicc mailing list
help-cgicc@...
http://lists.gnu.org/mailman/listinfo/help-cgicc