Wrox Programmer Forums
|
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
 
Old October 14th, 2004, 11:48 AM
Authorized User
 
Join Date: Sep 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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>


 
Old October 14th, 2004, 03:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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
 
Old October 14th, 2004, 07:55 PM
Authorized User
 
Join Date: Sep 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old October 14th, 2004, 08:02 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

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
 
Old October 15th, 2004, 09:50 AM
Authorized User
 
Join Date: Sep 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Cool.It works.Thanks Matt.

Widad






Similar Threads
Thread Thread Starter Forum Replies Last Post
Popup window automatically minimized on click! elisabeth Javascript How-To 19 January 29th, 2017 02:43 AM
Showing three frames in a single url click artarasan Classic ASP Basics 0 November 30th, 2007 06:52 AM
Centering Popup window & Blur Parent window jkusmanto Javascript How-To 0 May 25th, 2007 03:19 AM
dinamically showing a .swf file in a popup window ACE2084 ASP.NET 1.0 and 1.1 Basics 7 April 27th, 2005 10:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.