[mapserver-users] Fwd: Mapplet - Force Zoomdir with image buttons

Steve Lime steve.lime@dnr.state.mn.us
Mon, 10 Jun 2002 14:52:15 -0500


Received: from mail.state.mn.us
	(state.mn.us [156.99.125.109])
	by co5.dnr.state.mn.us; Fri, 31 May 2002 12:44:44 -0500
Return-Path: <macatel@libero.it>
Received: from lists.gis.umn.edu by mail.state.mn.us with ESMTP for steve.lime@dnr.state.mn.us; Fri, 31 May 2002 12:44:38 -0500
Received: from smtp3.libero.it (smtp3.libero.it [193.70.192.127])
	by lists.gis.umn.edu (8.9.3+Sun/8.9.1) with ESMTP id MAA22742
	for <mapserver-info@lists.gis.umn.edu>; Fri, 31 May 2002 12:45:38 -0500 (CDT)
Received: from z6v1u1 (151.30.148.53) by smtp3.libero.it (6.5.015)
        id 3CE925770052BE7B for mapserver-info@lists.gis.umn.edu; Fri, 31 May 2002 19:44:36 +0200
Message-Id: <001301c208ca$ed554680$35941e97@z6v1u1>
From: "Marco Catellani" <macatel@libero.it>
To: <mapserver-info@lists.gis.umn.edu>
Subject: Mapplet - Force Zoomdir with image buttons
Date: Fri, 31 May 2002 19:45:17 +0200
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi all.

I'm using MapServer 3.6 with Mapplet Extension.

The question involves zoomdir value. Using classical interface with radio
button (coupled with the [zoomdir_-1|0|1_check] special character) the
application run correctly.

I'm trying to use image buttons instead of radio buttons to obtain the same
result. What I need is that clicking the image the zoomdir value change
correctly.

I'm using code like this:

function ZoominSub(){
  document.mapserv.zoomdir.value = "1";
}

<input type="hidden" name="zoomdir" value="">
<a href="#" onClick="zoomin();">
<img src="http://localhost/images/zoomin.gif" alt="Zoom in"></a>

but I don't get what I want; in fact when I click the image and then I click
over the map the result is a pan operation, not a zoomin one.

Do you have any suggestion or advise?

Thank you very much!

Marco