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 September 9th, 2003, 02:26 PM
Registered User
 
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Call from database

Hi all, I am new to asp and was wondering if anyone could tell me how to call all data for a particular county to a web page when you click on that particular county on a map.
e.g. here is an example but not quite what I want. http://considerireland.com All I want is all the details on a page with hyperlinks etc.
Any help is greatly appreciated, even a line of code that I could duplicate.

 
Old December 18th, 2003, 04:39 AM
arp arp is offline
Authorized User
 
Join Date: Jun 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Put image on web page by following code:

<IMG SRC="Winter.jpg" NAME="Graphic1" ALIGN=LEFT WIDTH=563 HEIGHT=423 BORDER=0 USEMAP="#MAP1">

Using <MAP> <AREA></AREA></MAP> map that image for various counties in HTML editor. so that each county will have indivitual mapped area

use this map name as an attribute in <img> tag (Shown in blue at the end of tag)

call javascript function getCounty on onClick event of each map(i.e. each county) passing corresponding county name as parameter.


<MAP NAME="MAP1">
   <AREA SHAPE=RECT COORDS="0,188,563,421" onClick="return getCounty('county1');">
   <AREA SHAPE=RECT COORDS="0,0,563,188" onClick="return getCounty('county2');" >
</MAP>

Take a hidden field ( with value="") on the form to assign county name before submitting the form. Add following function to your code

<script language='Javascript1.2'>

function getCounty(county)
{
   document.form1.elements["hiddenfieldname"].value = county
   document.form1.submit()
return false;
}
</script>


Now collect this value by Request.Form("hiddenfieldname")
use this name to get corresponding data from database.

Best of Luck






Similar Threads
Thread Thread Starter Forum Replies Last Post
Database call Wayne Fennell SQL Language 8 October 11th, 2007 08:41 AM
Database call my app?? TheMajor SQL Server 2000 2 February 17th, 2007 10:49 AM
don't know how to call it stasnikov Access 2 January 17th, 2007 04:02 AM
How to call a sub in a sub busybee ASP.NET 1.0 and 1.1 Basics 4 March 22nd, 2006 01:39 AM
Unable to call the date from the database nvillare Classic ASP Basics 2 July 10th, 2003 04:44 PM





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