Solved

Imagemap to select 2 points.

Posted on 1997-02-26
2
191 Views
Last Modified: 2013-12-25
I'm writing some CGI applications.
I have a trouble which concernes with using ISMAP, but I think this must have happened to someone before. I'm trying to obtain from the user (client) two points (eg. source and
destination) from a single ISMAP .gif image. I'm working with apache1.2b6 over Solaris 2.3. First, I generate a HTML page asking the user to click over the first point. It makes the browser to send a GET query like this:       http://somewhere.net/coordinates.map?30,55
where coordinates.map is the name of the file where I have the coordinates of the relevant points of the image (!!over 110 points). When the server receives this, calls to the appropriate URL. This is another CGI to which I pass the point clicked. In the example it would be:
#Imagemap file coordinates.map
...
point /cgi-bin/choose-a-destination?src=Moscow 20,87
point /cgi-bin/choose-a-destination?src=London 30,55  # <--Closest point
point /cgi-bin/choose-a-destination?src=Madrid 70,21
...
which generates a HTML page that tells to the client that he choosed 'London' and asks for a second click, sending the second coordinates plus the src point. The question is : 1.- How can I generate such a page to call to another .map file, remembering the src field?.
(I tryed to generate /coordinates2.map?80,90&src=London but it doesn't work)
2.- I'm trying to make this whitn an stateless server. Can I do that?
Hope you can help me!!
0
Comment
Question by:jah
[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
2 Comments
 
LVL 5

Accepted Solution

by:
julio011597 earned 100 total points
ID: 1827730
I've never worked on this before, but here we go...

You could change to client-side imagemap'ing, and generate a first page (the 'source' page) containing this:

<MAP Name="a_map_name">
<AREA Shape="circle" Coords="20,87,10"
  Href="http://cgi_path/a_cgi?src=Moscow">
<AREA Shape="circle" Coords="30,55,10"
  Href="http://cgi_path/a_cgi?src=London">
...
</MAP>
...
<IMG Src="a_path/imagemap.gif" Usemap="#a_map_name" Ismap>

Now, when the user clicks on an imagemap spot, your cgi could process the query and - say it's src="London" - could output another page (the 'dest' page) containing this:

<MAP Name="a_map_name">
<AREA Shape="circle" Coords="20,87,10"
  Href="http://cgi_path/a_cgi?src=London&dest=Moscow">
<AREA Shape="circle" Coords="30,55,10"
  Href="http://cgi_path/a_cgi?src=London&dest=London">
...
</MAP>
...
<IMG Src="a_path/imagemap.gif" Usemap="#a_map_name" Ismap>

HTH
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1827731
After careful thinking (;-)), you could avoid sendind huge html pages making your cgi create a map file on the fly rather than sending those information on the client side.
The concept remains the same.

BTW, anybody in??
If you're in troubles with implementing what i've suggested, just ask back.
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

730 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