Query on a Picture

S

Sam B.

Hello all,

I am attempting to create a website that has a map of the US. I want the
user to be able to click on a state (........) and the state appear in a .dwt
page with other information relating to the state. Is there a way to link a
query to the picture so this can happen or do I need to create a database
search in the .dwt field that draws information from the index page?

Sam
 
S

Steve Easton

You would need to create an "Image map with hotspots" on the image of the US map.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
S

Sam B.

Hi Steve,

I understand that I need to create a hot spot in order to start the process.
How do I go about completing the second part of my question? From one page
I want to be able to click on the hotspots (on the map) and open a page that
list information for the state from a database. I don't want to create 50
different pages.

Thank you,
Sam
 
T

Thomas A. Rowe

Unless you plan to use a database, you will have to create 50 pages or create single page with 50
bookmarked sections, which would then take forever to load.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
S

Sam B.

I will be using a database. I'm just not sure how to create a query where I
will click the hotspot and a new page will open based on the database info
for the state.

Example: On the US map the user would click on the Florida hot spot. A page
would then open (pref. a template.dwt) with the information for Florida.

Thank you
 
T

Thomas A. Rowe

When you use a DWT, it is apply during design to all pages you want to have the format from the DWT.
If you are going to pull data from a database, you only need to create a single page formatted as
you want, then data from the database populate the page, which is basically a template.

You would assign a ID to each state that matches that state's record in the database. Images, etc.
would not be stored in the database, but in a folder within your web, and the file name stored
within the database. Your link would be basically structured like:

StateDisplay.asp?state=1, which would then load all of state 1 content on the page.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
S

Stefan B Rusynko

Is Massetchussetts the 53rd state? (-;




| if you're using the Database Wizard(s) you could just do a query like
|
| a normal hyperlink/hotspot link to (for example)
| http://www.yoursite.com/states.asp?state=Massetchussettts
| which would open the page called "states.asp" and load the info on
| Massetchussetts.
|
|
| Anyway link to the "hotspot"or rollover or however you're doing your
| image/image map.
|
|
| | > Hello all,
| >
| > I am attempting to create a website that has a map of the US. I want the
| > user to be able to click on a state (........) and the state appear in a
| > .dwt
| > page with other information relating to the state. Is there a way to link
| > a
| > query to the picture so this can happen or do I need to create a database
| > search in the .dwt field that draws information from the index page?
| >
| > Sam
|
|
 
S

Sam B.

Thank you everyone. I'll try this out today and see what I come up with.
Stay tuned!
 
S

Sam B.

Hello,

I tried your response and I still have an issue. When I click on the
hotspot the correct page is loaded, but loads with all other state
information.

Example:
The hyperlink I have for Florida is States.asp?state=FL
In my database I have a table called state. The primary key is the 2 letter
abriviation for the state.

Why would other states be coming up? If you need more details let me know.

Thank you
 
T

Thomas A. Rowe

Need to see your query to the database.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
S

Sam B.

Hi Thomas,

I'm a novice as you can see. The query is simply SELECT * FROM State. I
though that if I specified on the link states.asp?state=FL that this would
return all fields from record FL. All your help is much appreciated.
 
T

Thomas A. Rowe

Ok, try...

SELECT * FROM State WHERE State = '" & Request.QueryString("state") & "' "

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
S

Sam B.

Hi Thomas,

I used this query in the database result wizard and it worked like a charm.

SELECT * FROM State
WHERE State = '::state::'
 
T

Thomas A. Rowe

Great!

I always hand code, which allow complete code control, and allow for code changes to be easily done.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Top