Hi,
I have a modal window in which i have a list box and onchange event of list box i submit the form to the same page.
Now the problem i am facing is that it opens another modal window when i do so.
following is my code can some one tell me what i am doing wrong.
Thanks
-King
<%@ Language=VBScript %>
<%
Option Explicit
on error resume next
Response.Buffer = true
Response.Expires = -1
dim strMarket, conn, strProc, objWebData, rs, strGroup
conn = Application("cnADSCDS")
set objWebData = server.CreateObject("WebData.Reader")
set rs = server.CreateObject("ADODB.recordset")
'set rs = objWebData.getRS(cstr(conn),strProc,1)
if Request.Form("SelAgent")<>"" then
strMarket = Request.Form("SelAgent")
end if
if Request.QueryString("SelAgent") <> "" then
strMarket = Request.QueryString("SelAgent")
end if
%>
<HTML>
<HEAD>
<link rel="stylesheet" type="text/css" href="/css/mpstyle2.css">
<title>Proxy User Details</title>
</HEAD>
<BODY>
<table cellspacing="0" cellpadding="2" border="0" height="100%" valign="top">
<tr>
<td valign="top" width="100%">
<form name=frmProxyAgent id=frmProxyAgent method=post action="ProxyDetails.asp">
<br>
<div class="Lvl1Indent" style="width=450px;height=40px;">
<table width=440>
<tr>
<td width=120>
<b>Choose an Agent</b>
</td>
<td>
<%
dim strParam
strParam = Request.QueryString("list")
if strParam <>"" then
strProc = "spUSER_GetUserAgents '" & strParam & "'"
set rs = objWebData.getRS(cstr(conn),strProc,1)
Response.Write "<select name=selAgtAddList id=selAgtList style=width:200px onchange=frmProxyAgent.submit()>"
While not rs.EOF
Response.Write "<option "
Response.Write "value=" & rs.Fields("AgentNo")
Response.Write ">" & rs.Fields("AgentName") & "</option>"
rs.MoveNext
Wend
Response.Write "</select>"
Response.Write ("<BR>")
end if
set rs = nothing
%>
</td>
</tr>
</table>
</div>
<BR>
</form>
<%
set objWebData = nothing
set rs = nothing
%>
</BODY>
</HTML>
I have a modal window in which i have a list box and onchange event of list box i submit the form to the same page.
Now the problem i am facing is that it opens another modal window when i do so.
following is my code can some one tell me what i am doing wrong.
Thanks
-King
<%@ Language=VBScript %>
<%
Option Explicit
on error resume next
Response.Buffer = true
Response.Expires = -1
dim strMarket, conn, strProc, objWebData, rs, strGroup
conn = Application("cnADSCDS")
set objWebData = server.CreateObject("WebData.Reader")
set rs = server.CreateObject("ADODB.recordset")
'set rs = objWebData.getRS(cstr(conn),strProc,1)
if Request.Form("SelAgent")<>"" then
strMarket = Request.Form("SelAgent")
end if
if Request.QueryString("SelAgent") <> "" then
strMarket = Request.QueryString("SelAgent")
end if
%>
<HTML>
<HEAD>
<link rel="stylesheet" type="text/css" href="/css/mpstyle2.css">
<title>Proxy User Details</title>
</HEAD>
<BODY>
<table cellspacing="0" cellpadding="2" border="0" height="100%" valign="top">
<tr>
<td valign="top" width="100%">
<form name=frmProxyAgent id=frmProxyAgent method=post action="ProxyDetails.asp">
<br>
<div class="Lvl1Indent" style="width=450px;height=40px;">
<table width=440>
<tr>
<td width=120>
<b>Choose an Agent</b>
</td>
<td>
<%
dim strParam
strParam = Request.QueryString("list")
if strParam <>"" then
strProc = "spUSER_GetUserAgents '" & strParam & "'"
set rs = objWebData.getRS(cstr(conn),strProc,1)
Response.Write "<select name=selAgtAddList id=selAgtList style=width:200px onchange=frmProxyAgent.submit()>"
While not rs.EOF
Response.Write "<option "
Response.Write "value=" & rs.Fields("AgentNo")
Response.Write ">" & rs.Fields("AgentName") & "</option>"
rs.MoveNext
Wend
Response.Write "</select>"
Response.Write ("<BR>")
end if
set rs = nothing
%>
</td>
</tr>
</table>
</div>
<BR>
</form>
<%
set objWebData = nothing
set rs = nothing
%>
</BODY>
</HTML>