#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    9
    Rep Power
    0

    Question is it possible to include ASP in a client side image map?


    i want to retrieve some data from my database when certain parts of my map are clicked, and display them onto the same page. how would i go about doing this? (if at all possible)

    <%if mapyear = "1800" then %>
    <a href="different.asp"><img alt="imagemap" src="images/pics/walk.bmp" width=450 height=338 usemap="#pigswalk" border=0></a>
    <map name="pigswalk">
    <area shape="rect" coords="1,1,100,150" href="front.asp">
    <area shape="rect" coords="300,1,450,150">

    <%elseif mapyear = "1850" then %>

    <img alt= "works" src="images/pics/bigred.bmp">

    <%elseif mapyear = "1900" then %>

    <img alt= "works" src="images/pics/Tolkin.bmp">

    <%elseif mapyear = "1950" then %>

    <%elseif mapyear = "2000" then %>

    <%end if%>

    any help would be much appreciated
    j
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    USA
    Posts
    226
    Rep Power
    14
    Pass variables through the imagemap:

    <map name="pigswalk">
    <area shape="rect" coords="1,1,100,150" href="front.asp?mapyear=1850">
    <area shape="rect" coords="300,1,450,150" href="front.asp?mapyear=1950">
    </map>

    On the top of your page include this:

    <%
    dim mapyear
    mapyear = Request.Querystring("mapyear")
    %>

    Then do your if then statements:

    <%
    if mapyear = 1850 then etc...
    %>
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    9
    Rep Power
    0

    thanks


    thanks for the help bramsey.

    much appreciated.

    j

IMN logo majestic logo threadwatch logo seochat tools logo