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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top