Sending ASP ADO Recordset Value to Javascript Function

C

Chris

I am new to these forums and hope I am in the right place!

I am working on an ASP (3.0) page that displays hotel data from a
recordset in a table. In the last column of each row, I want to include
a button that will send the address information of this hotel to
mapquest to display the map. I have tried several methods for sending
this info, but nothing seems to work.

Here is my code for the javascript function I am calling:

<SCRIPT LANGUAGE="JavaScript">
function goToMapquest(oRSHotels("hotelStreet"), oRSHotels("hotelCity"),
oRSHotels("hotelState"), oRSHotels("hotelZipCode")) {

window.location =
"http://www.mapquest.com/maps/map.ad...ntry=US&addtohistory=&searchtab=home&address=<%
=Replace(oRSHotels("hotelStreet"), CHR(32), "+") %>&city=<%
=oRSHotels("hotelCity") %>&state=<% =oRSHotels("hotelState")
%>&zipcode=<% =oRSHotels("hotelZipCode") %>"; } </script>

This is the table cell:

<td class="Log"><input type="button" value="Map"
onclick="goToMapquest(oRSHotels("hotelStreet"), oRSHotels("hotelCity"),
oRSHotels("hotelState"), oRSHotels("hotelZipCode"))" id=button1
name=button1></td>


This clearly is not working! I am not too familiar with javascripting
and was wondering if there might be a better way to send these
recordset values?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top