Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 14th, 2004, 11:48 AM
Authorized User
 
Join Date: Sep 2004
Location: , , .
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>


Reply With Quote
  #2 (permalink)  
Old October 14th, 2004, 03:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
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
Reply With Quote
  #3 (permalink)  
Old October 14th, 2004, 07:55 PM
Authorized User
 
Join Date: Sep 2004
Location: , , .
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

Reply With Quote
  #4 (permalink)  
Old October 14th, 2004, 08:02 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
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
Reply With Quote
  #5 (permalink)  
Old October 15th, 2004, 09:50 AM
Authorized User
 
Join Date: Sep 2004
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Cool.It works.Thanks Matt.

Widad

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:17 AM.


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