I have a web page named main.asp (code below) and need to pass data via a
form to a new window called detail.asp that is fixed in size with no scroll
or address bars.
The following code lets me open a new fixed size window but will not pass
data from the form to detail.asp.
It works properly if I replace the line:
Response.Write "<form onsubmit='return newWindow()' method='post'>"
Response.Write "<form action='detail.asp' method='post'>"
but then I get a standard browser window.
Any and all help will be greatly appreciated.
Joel
Code follows:
**********************
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include virtual='adovbs.inc'-->
<script language="Javascript" type="text/javascript">
var row, col;
function newWindow(){
getWindow = window.open("detail.asp", "_blank",
"height=600,width=300");
}
</script>
<%
dim objMain, objConn, iLoop, iLoop1
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=mydb"
objConn.open
Set objMain = Server.CreateObject ("ADODB.Recordset")
objMain.open "main", objConn, , , adCmdTable
%>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<table border="1">
<%
objMain.MoveFirst
Do while not objMain.EOF
for iLoop = 1 to 4
Response.Write "<tr>"
for iLoop1 = 1 to 9
Response.Write "<td>"
Response.Write "<form onsubmit='return newWindow()'
method='post'>"
Response.Write objMain("c" & iLoop1) & "<br>"
Response.Write "<input type='hidden' name='row'
value='" & iLoop & "'>"
Response.Write "<input type='hidden' name='col'
value='" & iLoop1 & "'>"
Response.Write "<input type='submit'>"
Response.Write "</form>"
Response.Write "</td>"
next
Response.Write "</tr>"
objMain.MoveNext
next
loop
%>
</table>
</body>
</html>
<%
objMain.Close
Set objMain = Nothing
objConn.Close
Set objConn = Nothing
%>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/