Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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 February 13th, 2004, 05:22 PM
Registered User
 
Join Date: Feb 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Ronen1
Default Can't open page with param from DB

Hey,
I facing a problem for a long time.
I can't get to open a new asp window with parameter from DB.
Everytime I run the page it gives me "syntax error"

Here is what I wrote in the page (with the error):
---------------------------------------------------
<SCRIPT LANGUAGE="JavaScript">
    function openwin(paramName){
        var win= window.open("OnePlace.asp?uPlace=" + paramName,null,"width=650, height=500,toolbar=1, status=1, resizable=1");
        }
</SCRIPT>

-----------------------------------

<%
rs.MoveFirst
dim Place
Place = rs("Place")
%>

<p> <a href="javascript:openwin(<%=Place%>);">look here <%=Place%></a> </p>

------------------------------------------------
Of course I did all the connections at the top page of the database and the recordset. and that is working fine.

Could use any help you can give me !
Thank you,
Ronen
 
Old February 13th, 2004, 08:07 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Is "Place" a string value? You probably need to add quotes around your javascript call.
Code:
<a href="javascript:openwin('<%=Place%>');">
                            ^          ^
Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Find Open DB Connections? Ron Howerton ASP.NET 2.0 Professional 6 April 23rd, 2008 12:29 PM
Unable to open ProjectTimeTracker DB cancer2006 BOOK: Beginning VB.NET Databases 2 October 24th, 2006 03:53 PM
passing a page into a web service as a byref param jonny75904 ASP.NET 1.0 and 1.1 Professional 0 August 15th, 2006 04:08 PM
asp can't open db when db open by other program datuk Classic ASP Professional 3 June 13th, 2006 06:10 PM
open close db mikeuk PHP Databases 3 July 19th, 2004 11:58 AM





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