Javascript map within a form?????

Results 1 to 2 of 2

Thread: Javascript map within a form?????

  1. #1
    Join Date
    Dec 1969

    Default Javascript map within a form?????

    I want to build a javascript imagemap. when someone clicks a section I want to run an asp that is passed a value given the section of the map. For example. Say you click on OHIO, when that is submited is there anyway to get a value from that state so I could run a query like {Select * from [table] where State = OHIO} And if I clicked on another state it would pass thats state name through instead. Bascially I only want to write one asp and save myself a headache. ??Can map regions be given values that can be parsed out of a Post submission??

  2. #2
    John Harvey Guest

    Default RE: Javascript map within a form?????

    You could use the form and write an onClick method for each link in the image map, and call a function that changes the value of a hidden tag to be sent to the asp, but an easier solution would be to have the imagemap call the asp like this...<BR>&#060;AREA SHAPE=RECT COORDS="7,54,77,126" HREF="/myAsp.asp?state=OHIO"><BR>Then in the ASP use something like<BR>SelectedState = Request.QueryString("state")<BR>SQL = "SELECT * FROM [table] WHERE STATE = " & SelectedState<BR>Good Luck<BR><BR>John

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts