Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Hidden types and image maps

Posted on 1997-05-22
2
Medium Priority
?
183 Views
Last Modified: 2013-12-25
I'm trying to create an map of my state on my page using a
Perl CGI script.  I can create it and everything but the problem is in the .map file associated with the .gif file.  When a person clicks on a portion of the map I want to assign a number to a variable and pass it through.

My first try looked like this in the .map file:
 poly county=4 108,159 112,159 112,160 142,160 142,161
and like this in the script:
 print "<A HREF=\"http://www.someplace.com/cgi-bin/counties.map\">";
 print "<IMG SRC=\"/gifs/counties.gif\" ISMAP></A>";
     
My CGI script loops back to itself and I get the value of county using the CGI.pm library functions.  The previos example works but there are other variable that I need to pass through as hidden, but when I include the map, those hidden variables don't go through.

Then I tried this in the script:
(inside a form)
  <INPUT type=image src=yourimage.gif value="testvalue">

But then, the action described in the .map file is ignored.
So all the other variables go through, but not 'county' defined in the .map file.

QUESTION:
How do I either: 1)do the first example while having the ability to pass through the hidden variables (cookies?)
2)Use the second method and somehow coordinate the details in the .map file with the variables passed using the form.
0
Comment
Question by:webslider
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:webslider
ID: 1828062
Edited text of question
0
 
LVL 5

Accepted Solution

by:
icd earned 200 total points
ID: 1828063
First of all I would not use a server side image map but a client side one.
Just in case you don't know the format you can get details from:-

http://www.authors.com/imgmaps.htm

Next, I assume from your message that the html which contains the reference to the map is generated 'on the fly' by your script.

It is now a simple case to modify the output of the script to include the variables in the URL. For example:-

<AREA SHAPE=RECT COORDS="452,29,633,212" HREF="yourscript.pl?par1=$par1&par2=$par2">

Then when the script 'loops back' on itself it gets the coordinates as well as the parameters.

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question