2 questions: javascript-aspnet and zooming [Archive] - XML Elves

2 questions: javascript-aspnet and zooming

dejgraphix
05-12-2004, 01:31 AM
hi there!

i'm new to svg and need a little (big) help...

i'm actually using asp.net, the first question is:
how can i pass a value from a click on the svg map to the code behind in the asp net page? (javascript?)

the second question is: can i disable the zoom function (ctrl+click) ? i'd like to control the level of detail of the map, so i need to zoom-in and zoom-out using some buttons..


thanks in advance!
dejgraphix

jon - svg
05-18-2004, 05:41 AM
Hi dejgraphix,

Good questions.

how can i pass a value from a click on the svg map to the code behind in the asp net page? (javascript?)

Yes, javascript works but you can also use SVG's <a> element, just like HTML. The easiest way to pass values is via the querystring. Or you can use postURL() - http://www.learnsvg.com/tutorial2/example/postURL.svg. You will also want to checkout getURL(). This is a good free reference - http://www.learnsvg.com/tutorial2/catalog.php

Passing values into Web services is another possibility. I will soon have some articles available on xml.com that details this approach.

the second question is: can i disable the zoom function (ctrl+click) ? i'd like to control the level of detail of the map, so i need to zoom-in and zoom-out using some buttons..

Yes, I believe you can by handling the ctrl Key event. Here is an example:
http://www.learnsvg.com/tutorial2/example/shiftKey.svg However, I have not yet tested this.

Best,

Learn SVG - http://learnsvg.com

Anonymous
05-20-2004, 02:18 AM
many thanks!

i found i can disable zoom an pan using 'zoomAndPan="disable"' in the <svg> tag

i'll check out the links you posted

regards
dejgraphix

Anonymous
06-14-2004, 05:22 PM
Hi dejgraphix,

Good questions.

how can i pass a value from a click on the svg map to the code behind in the asp net page? (javascript?)

Yes, javascript works but you can also use SVG's <a> element, just like HTML. The easiest way to pass values is via the querystring. Or you can use postURL() - http://www.learnsvg.com/tutorial2/example/postURL.svg. You will also want to checkout getURL(). This is a good free reference - http://www.learnsvg.com/tutorial2/catalog.php

Passing values into Web services is another possibility. I will soon have some articles available on xml.com that details this approach.

the second question is: can i disable the zoom function (ctrl+click) ? i'd like to control the level of detail of the map, so i need to zoom-in and zoom-out using some buttons..

Yes, I believe you can by handling the ctrl Key event. Here is an example:
http://www.learnsvg.com/tutorial2/example/shiftKey.svg However, I have not yet tested this.

Best,

Learn SVG - http://learnsvg.com

Phil Topper
03-28-2005, 08:21 PM
In other news, president bush anounced that he's contracted a new power to help in the fight against terrorism. Officials in transylvania have confirmed that Count Dracula will be joining coilition forces in the hunt for Osama Bin Laden. In a news confrence this morning GW offered a bold challenge to all who practice terror:

"We'll hunt ya down using any means necessary. If that means tactical supernatural weapons then so be it. If we dont get em, old Draco here will, thats for dam sure."




Phil Topper

Guaranteed Signups (http://www.e-signups.com/b/)
To know wisdom and instruction; To discern the words of understanding;

 
Web mp2kmag.com
mapforums.com

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum