how access to HTML controls atributes ?
"Vedro" <[email protected]> Fri, 9 Jan 2009 09:26:38 +0100
| Newsgroups | gmane.comp.gcc.cgicc.general |
|---|---|
| Message-ID | <001e01c97233$fe4dcd20$19341dac@VEDRANRSS> |
This is a multi-part message in MIME format.
--===============1150478150==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_001B_01C9723C.5F87F680"
This is a multi-part message in MIME format.
------=_NextPart_000_001B_01C9723C.5F87F680
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
Hi,
I am new to cgicc library and I have a following problem.
I defined <select> HTML control like this:
cgicc::select sel1 =3D cgicc::select();=20
sel1.set("name","someName").set("class","selectfield").set("SIZE","1");se=
l1.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.
------=_NextPart_000_001B_01C9723C.5F87F680
Content-Type: text/html;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-2">
<META content=3D"MSHTML 6.00.2900.3492" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>I am new to cgicc =
library and=20
I have a following problem.</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>I defined =
<select>=20
HTML control like this:</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>cgicc::select sel1 =3D cgicc::select(); </DIV>
<DIV>
<P>sel1.set(</FONT><FONT color=3D#a31515 size=3D2>"name"</FONT><FONT=20
size=3D2>,</FONT><FONT color=3D#a31515 size=3D2>"someName"</FONT><FONT=20
size=3D2>).set(</FONT><FONT color=3D#a31515 size=3D2>"class"</FONT><FONT =
size=3D2>,</FONT><FONT color=3D#a31515 =
size=3D2>"selectfield"</FONT><FONT=20
size=3D2>).</FONT><FONT size=3D2>set(</FONT><FONT color=3D#a31515=20
size=3D2>"SIZE"</FONT><FONT size=3D2>,</FONT><FONT color=3D#a31515=20
size=3D2>"1"</FONT><FONT size=3D2>);sel1.add(br());</FONT></P><FONT =
size=3D2>
<P>sel1.add(option(</FONT><FONT color=3D#a31515 =
size=3D2>"0/1"</FONT><FONT=20
size=3D2>).set(</FONT><FONT color=3D#a31515 size=3D2>"class"</FONT><FONT =
size=3D2>,</FONT><FONT color=3D#a31515 =
size=3D2>"selectfield"</FONT><FONT=20
size=3D2>).set(</FONT><FONT color=3D#a31515 size=3D2>"value"</FONT><FONT =
size=3D2>,</FONT><FONT color=3D#a31515 size=3D2>"1"</FONT><FONT=20
size=3D2>));sel1.add(br());</P>
<P>sel1.add(option(</FONT><FONT color=3D#a31515 =
size=3D2>"0/2"</FONT><FONT=20
size=3D2>).set(</FONT><FONT color=3D#a31515 size=3D2>"class"</FONT><FONT =
size=3D2>,</FONT><FONT color=3D#a31515 =
size=3D2>"selectfield"</FONT><FONT=20
size=3D2>).set(</FONT><FONT color=3D#a31515 size=3D2>"value"</FONT><FONT =
size=3D2>,</FONT><FONT color=3D#a31515 size=3D2>"2"</FONT><FONT=20
size=3D2>));sel1.add(br());</P>
<P>sel1.add(option(</FONT><FONT color=3D#a31515 =
size=3D2>"0/3"</FONT><FONT=20
size=3D2>).set(</FONT><FONT color=3D#a31515 size=3D2>"class"</FONT><FONT =
size=3D2>,</FONT><FONT color=3D#a31515 =
size=3D2>"selectfield"</FONT><FONT=20
size=3D2>).set(</FONT><FONT color=3D#a31515 size=3D2>"value"</FONT><FONT =
size=3D2>,</FONT><FONT color=3D#a31515 size=3D2>"3"</FONT><FONT=20
size=3D2>));sel1.add(br());</P>
<P>sel1.add(option(</FONT><FONT color=3D#a31515 =
size=3D2>"0/4"</FONT><FONT=20
size=3D2>).set(</FONT><FONT color=3D#a31515 size=3D2>"class"</FONT><FONT =
size=3D2>,</FONT><FONT color=3D#a31515 =
size=3D2>"selectfield"</FONT><FONT=20
size=3D2>).set(</FONT><FONT color=3D#a31515 size=3D2>"value"</FONT><FONT =
size=3D2>,</FONT><FONT color=3D#a31515 size=3D2>"4"</FONT><FONT=20
size=3D2>));sel1.add(br());</P></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>I would like to access =
to every=20
embedded object (each option) inside sel1 object going through some =
loop,=20
check value of</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>each option object and =
set "selected"=20
atribute if needed.</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>I see that =
HTMLElement object=20
has HTMLElementList data which contains embedded object but it is =
private and=20
it's possible to add new object into this =
list only.</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>There is no interface =
which provide=20
accessing i.e. reading and seting different atribute inside =
particular=20
object ( in this case in "options" object inside "select" object) and I =
do not=20
understand why it's like that.</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>Are there any other =
ways to access=20
(and changes) atributes inside defined objects ?</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>Thanks in =
advance</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>V.</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_001B_01C9723C.5F87F680--
--===============1150478150==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
help-cgicc mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cgicc
--===============1150478150==--