V
Vadivel Kumar
Hi,
Iam facing a problem in adding a value to a list box which is located in
parent window thru a child window. I made the listbox as HTML control and
the following is the code i have written in the child window to add a value
in it.
When i clicked the submit button of child window it throws a error "Server
threws an exception" and the window is
get closed.
Plz help me!!.
function addOption(selectObject,optionText,optionValue) {
var optionObject = new Option(optionText,optionValue)
var optionRank = selectObject.options.length
selectObject.options[optionRank]=optionObject
}
</script>
<html>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form id="sellcateg" runat="server">
<INPUT id="btnsububmit"
onclick="addoption(window.opener.document.forms[0].ListBox1,'test','12');"
type="button" value="Submit" name="btnsubmit">
<aspataGrid id="MyDataGrid" runat="server" AutoGenerateColumns="false">
<columns>
<asp:BoundColumn DataField="cat_id" HeaderText="category
id"></asp:BoundColumn>
<asp:BoundColumn DataField="subcat_id" HeaderText="subcategory
id"></asp:BoundColumn>
<asp:BoundColumn DataField="subcategory"
HeaderText="subcategory"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="select">
<HeaderTemplate>
<Input type="checkbox" id="checkall" runat="server">
</headertemplate>
</asp:TemplateColumn>
</columns>
</aspataGrid>
Thanks in Advance
Vadivel Kumar
Iam facing a problem in adding a value to a list box which is located in
parent window thru a child window. I made the listbox as HTML control and
the following is the code i have written in the child window to add a value
in it.
When i clicked the submit button of child window it throws a error "Server
threws an exception" and the window is
get closed.
Plz help me!!.
function addOption(selectObject,optionText,optionValue) {
var optionObject = new Option(optionText,optionValue)
var optionRank = selectObject.options.length
selectObject.options[optionRank]=optionObject
}
</script>
<html>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form id="sellcateg" runat="server">
<INPUT id="btnsububmit"
onclick="addoption(window.opener.document.forms[0].ListBox1,'test','12');"
type="button" value="Submit" name="btnsubmit">
<aspataGrid id="MyDataGrid" runat="server" AutoGenerateColumns="false">
<columns>
<asp:BoundColumn DataField="cat_id" HeaderText="category
id"></asp:BoundColumn>
<asp:BoundColumn DataField="subcat_id" HeaderText="subcategory
id"></asp:BoundColumn>
<asp:BoundColumn DataField="subcategory"
HeaderText="subcategory"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="select">
<HeaderTemplate>
<Input type="checkbox" id="checkall" runat="server">
</headertemplate>
</asp:TemplateColumn>
</columns>
</aspataGrid>
Thanks in Advance
Vadivel Kumar