Re: Select control DHTML by abcd
abcd
Thu Nov 09 11:44:59 CST 2006
This is a multi-part message in MIME format.
------=_NextPart_000_0022_01C703E3.BAB0D8C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sample code I am trying as below. Here, I want to replace the list box =
with different entries on the button click.=20
<HTML>
<head>
<script language=3D"javascript">
function Test()
{
//var oldinnerHTML =3D document.frm.sel.innerHTML
document.frm.sel.innerHTML=3D "<option>111</option><option>222</option>"
}
</script>
</head>
<form name=3D"frm">
<select name=3D"sel">
<option>aaa</option>
<option>bbb</option>
<option>ccc</option>
<option> ddd</option>
</select>
</form>
<input type=3D"Button" name=3D"btn" value=3D"press" onclick=3D"Test()">
</html>
"abcd" <abcd@abcd.com> wrote in message =
news:uQ9KzYCBHHA.3536@TK2MSFTNGP03.phx.gbl...
I have a list box filled with entries. On a button click I want to =
fill the different entries in the same list box. How do I refresh it =
with new entries. I tried innerHTML but did not work for me.
Thanks in advance
------=_NextPart_000_0022_01C703E3.BAB0D8C0
Content-Type: text/html;
charset="iso-8859-1"
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-1">
<META content=3D"MSHTML 6.00.2900.2963" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Sample code I am trying as below. Here, =
I want to=20
replace the list box with different entries on the button click. =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Courier New" color=3D#800000=20
size=3D2><HTML><BR><head><BR><script=20
language=3D"javascript"><BR>function Test()<BR>{<BR>//var =
oldinnerHTML =3D=20
document.frm.sel.innerHTML<BR>document.frm.sel.innerHTML=3D=20
"<option>111</option><option>222</option>"</FONT>=
</DIV>
<DIV><FONT face=3D"Courier New" color=3D#800000 size=3D2>}</FONT><FONT=20
size=3D2><BR><FONT face=3D"Courier New"=20
color=3D#800000></script><BR></head></FONT></FONT></DIV>
<DIV><FONT size=3D2><BR><FONT face=3D"Courier New" =
color=3D#800000><form=20
name=3D"frm"><BR><select=20
name=3D"sel"><BR><option>aaa</option><BR><option>bbb=
</option><BR><option>ccc</option><BR><option>=20
ddd</option><BR></select><BR></form><BR><input=20
type=3D"Button" name=3D"btn" value=3D"press"=20
onclick=3D"Test()"><BR></html></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"abcd" <<A href=3D"mailto:abcd@abcd.com">abcd@abcd.com</A>> =
wrote in=20
message <A=20
=
href=3D"news:uQ9KzYCBHHA.3536@TK2MSFTNGP03.phx.gbl">news:uQ9KzYCBHHA.3536=
@TK2MSFTNGP03.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I have a list box filled with =
entries. On a=20
button click I want to fill the different entries in the same list =
box. How do=20
I refresh it with new entries. I tried innerHTML but did not work for=20
me.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance</FONT></DIV>
<DIV> </DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0022_01C703E3.BAB0D8C0--