Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

modal window opening another modal window

Status
Not open for further replies.

Kingkumar

Programmer
Jan 21, 2003
167
US
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>
 
Cant see any reason why it should be opening a new window. Try adding a target attribute to the form to point it to the same page:
Code:
<form name=frmProxyAgent id=frmProxyAgent method=post action="ProxyDetails.asp" [red]target="_self"[/red]>

Tony
_______________________________________________________________
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top