473,766 Members | 2,026 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing additional data with ismap

Greetings,

I'm trying to write a mapping app that the user can click on some nav
buttons (Up, Down, Lf, Rt, Zooom, etc) to pan/zoom the image but also
include 'ismap' such that where ever the user clicks on the image, it
will recenter on that spot (X,Y). I can get things working with either
the nav buttons or ismap but not both due to fact that I need to pass 3
additional name/value pairs (xc,yc,z_num) to the calling script. This
is what I'm trying:

<?php

//########### geo_caller.php #############//
//#### Original Image size 1800 X 1200 ######//

$base = 0.8;
$input=array_ke ys($_GET);

if (isset($zoom)) {
$z_num += $zoom;
$z_fact = pow($base,$z_nu m);
} elseif (isset($horz)) {
$z_fact = pow($base,$z_nu m);
$xc += $horz*80*$z_fac t;
} elseif (isset($vert)) {
$z_fact = pow($base,$z_nu m);
$yc += $vert*60*$z_fac t;
} elseif (isset($input[0])) {
$z_fact = pow($base,$z_nu m);
$coords = explode(',', $input[0]);
$xc += (400-$coords[0])*$z_fact;
$yc += (300-$coords[1])*$z_fact;
} else {
$z_num = 0;
$z_fact = 1;
$xc = 900;
$yc = 600;
}

$scr_wdth = $z_fact*800;
$scr_ht = $z_fact*600;
$scr_x = $xc-($scr_wdth/2);
$scr_y = $yc-($scr_ht/2);

print "<input type=hidden name=xc value=$xc>";
print "<input type=hidden name=yc value=$yc>";
print "<input type=hidden name=z_num value=$z_num>";

echo "<a href=\"geo_call er.php\">";
echo "<img
src=\"geo_plot. php?SCR_WDTH=$s cr_wdth&SCR_HT= $scr_ht&SCR_X=$ scr_x&SCR_Y=$sc r_y\"
border=0 width=800 height=600 ismap></a>;\n";

?>

I need to somehow pass/retain the current xc, yc, z_num variables but I
can't when using 'ismap'. I've found snippets of javascript where I can
extract the X,Y coordinates but it gets to complicated trying to mix
the two.

Any ideas?

-Matt

Jul 17 '05 #1
4 3319
I can get things working with either
the nav buttons or ismap but not both due to fact that I need to pass 3 additional name/value pairs (xc,yc,z_num) to the calling script.


Matt:

You seem to be trying to pass the extra data in hidden form variables,
but there's no <form> to contain them and no <input type="submit">
widget either. I don't think any browser will know what to do with
them.

But since you are also passing some URL parameters to geo_plot.php, if
these variables are being picked up correctly why not add the missing 3
variables to this list?

---
Steve

Jul 17 '05 #2
geo_plot.php is the script that generates the image (map) on the fly.
The main or calling script (geo_caller.php ), listed above, actually
calls itself. It recalculates some parms which get passed to the
geo_plot.php script which in turn recreates the image. Kind of
confussing. The hidden form variables were just where I last left
experimenting with it.

Thanks

-Matt

Jul 17 '05 #3

That makes it clearer. Append the 3 extra vars to the handler URI, plus
an empty dummy placeholder var for the image map co-ords:

geo_caller.php? xc=$xc&yc=$yc&z _num=$z_num&map =

The co-ords from the image map will appear at the end of the
QUERY_STRING, making it look like this:

xc=900&yc=600&z _num=0&map=?371 ,113

You now get 'map' as a key in the $_GET[] array, with the co-ords
prefixed with '?' and delimited by ','. Split on '?', then ',', then
proceed as before. Your extra vars are also in $_GET[] of course.
---
Steve

Jul 17 '05 #4

Steve wrote:
That makes it clearer. Append the 3 extra vars to the handler URI, plus an empty dummy placeholder var for the image map co-ords:

geo_caller.php? xc=$xc&yc=$yc&z _num=$z_num&map =

The co-ords from the image map will appear at the end of the
QUERY_STRING, making it look like this:

xc=900&yc=600&z _num=0&map=?371 ,113

You now get 'map' as a key in the $_GET[] array, with the co-ords
prefixed with '?' and delimited by ','. Split on '?', then ',', then
proceed as before. Your extra vars are also in $_GET[] of course.
---
Steve


That works Perfect.

Thanks for your help.

-Matt

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3519
by: Martin | last post by:
For use in IE only: I need to make some calculations (in a client-side script) based on the X,Y coordinates of the mouse pointer when the user clicks on an image. I want the coordinates to be screen-resolution independent. The image tag's "ismap" generates exactly the numbers I'm looking for but I can't figure out how to capture them. "ismap" seems to work only when used in conjunction with an "href" and a new page is automatically...
11
3185
by: Arsen Vladimirskiy | last post by:
Hello, If I have a few simple classes to represent Entities such as Customers and Orders. What is the proper way to pass information to the Data Access Layer? 1) Pass the actual ENTITY to the Data Access Layer method -or- 2) Pass some kind of a unique id to the Data Access Layer method
3
3160
by: Paul Michaud | last post by:
Consider the following: Class A { .... } Class B:A { ....
7
10238
by: Tim | last post by:
When there is a need to pass some dynamic information between 2 managed assemblies, the "Dictionary object" in Generic form can be used as a method parameter to pass the information. The information that needs to be passed can be stored as Key-Value pairs, and the method signature remains the same. That way, handling future requirements of passing additional details to the callee can be handled without changing the method signature. Is...
2
1268
by: Jeff Calico | last post by:
Hello everyone I have sucessfully implemented a SAX filter to take a large XML data file, and strip it down to its essential elements, and then pass that on to an XSL transformer. (A bare bones example of the java code is listed at the end) I also need another XML file, a list of all possible records, which I use for getting additional information by cross referencing with xsl:key. The list file only has one type of element, and I...
4
2668
by: nickcleary1 | last post by:
I need to pass 4 integers between two forms but am having trouble passing more than one.I am hoping to use the contructor approach as i need the variables straight away Any help would be great thanks Nick
1
9314
by: | last post by:
Hi all, I am writing a sendmail milter application in Java. The incoming mails will usually have image file as attachments. My application is currently able to extract the ImageFile and save it on the filesystem. This part is working perfectly. ((MimeBodyPart)p).saveFile(new File(p.getFileName())); However, I would like to pass this file as a byte array to a c++ library
3
6882
by: ToddFur | last post by:
I see several postings on this but I am still unable to figure out my problem. I can pass the values of my text field but not radio button (or even checkboxes). My PHP file <?php //declare our variables $day = $_GET; $date = $_GET; $groupname = $_GET;
0
10008
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9837
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.