 |
| Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 14th, 2004, 11:48 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
showing a popup window on click
Hi i want to pass a value to a javascriptfunction which shows a pop up window.I am getting an error please help
<table border=1>
<th>User</th><th>Date</th>
<%
Dim objConn ' Connection Name
Dim strConn ' Connection String
Dim objRS ' Recordset Variable
Dim intTotalColumns
Dim intCounter
Const adOpenStatic = 3
Const adLockReadOnly = 1
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("asp.mdb") & ";"
objConn.Open strConn
objRS.open strSQL, objConn, adOpenStatic, adLockReadOnly
if objRS.EOF then
Response.write "Error.Please go back"
end if
do while not objRS.EOF
%>
<tr><td><a href=# onclick=javascript:window.open("detail.asp?coursei d="+<%=objRS(0)%>, null,"height=200,width=400,status=yes,toolbar=no,m enubar =no,location=no")><%=objRS("UNAME")%></a></td>
<td><%=objRS("dt") %>::<%=objRS("ti")%></td>
<%
objRS.MoveNext
loop
%>
</table>
|
|

October 14th, 2004, 03:38 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Try
<a href="javascript:window.open('detail.asp?courseid= <%=objRS(0)%>', null,'height=200,width=400,status=yes,toolbar=no,m enubar=no,location=no')"><%=objRS("UNAME")%></a>
Brian
|
|

October 14th, 2004, 07:55 PM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for u r reply.Its working,but the parent page is being redirected to a blankpage(no errors being dispalyed)when ever the pop is being popped up.Any ideas!
Thanks!,
widad
|
|

October 14th, 2004, 08:02 PM
|
|
Friend of Wrox
|
|
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
|
|
Try:
<a href="#" onClick="javascript:window.open('detail.asp?course id=<%=objRS(0)%>', null,'height=200,width=400,status=yes,toolbar=no,m enubar=no,location=no')"><%=objRS("UNAME")%></a>
Wind is your friend
Matt
|
|

October 15th, 2004, 09:50 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Cool.It works.Thanks Matt.
Widad
|
|
 |