Hi,
Try this:
Response.Write("<script> AddItem('test', '0') </script>")
Then in your aspx page have this:
<script language='javascript'>
function AddItem(strText, strValue) {
listbox1.options.add(document.createElement("optio n"));
listbox1.options[(listbox1.options.length - 1)].text = strText;
listbox1.options[(listbox1.options.length -1 )].value = strValue;
}
</script>
Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.
"Mariame" <Ma************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Everyone
im using an html textbox that runat server in webform1 and i send it the
value from webform2 using the following script :
Response.Write("<script>window.opener.Form1.textbo x.value = '" + variable+
"' </script>")
It Works
The problem that i want to replace the html textbox with html listbox
(also runat server)so it can hold several items, so i tried this script
Response.Write("<script>window.opener.Form1.listbo x1.items.add( '" +
variable+ "') </script>")
But it gives me error in script, Any idea about how to make it work?????
Thx in Adv