Hi all.
We have a requirement to return the (pixel) coordinates
specifying where a
user has clicked on an image (its an asp.net front-end
hitting a cold-fusion
web-service interacting with a GIS mapping system).
The new ImageMap control in asp.net 2.0 offers a 'Click'
event but due to
the way HTML imagemaps work it can't parse the co-ordinates
that are
returned in the querystring (they are malformed).
So I found a control that a fellow has made which extends
the ImageMap
control making available the coordinates as arguments of the
click-event:
ht
tp://www.codeproject.com/useritems/ImageMap2.asp
Works great, until I place a standard asp.net dropdown list
on the same page
and set its auto-postback property to true. I'm guessing
the JS injected by
the dropdown list to hook-up the auto-postback event
conflicts with the JS
code written by the custom control to capture the clicked
coordinates and
pass them through to the click-event.
Basically the Click-event of the custom control just
doesn't fire in this
situation. I've stepped through the code and everything
else in the page
lifecycle fires except the click-event.
Anyway, I'm not too gifted with JS so I was wondering if
anyone can spot the
culprit when comparing the output of the two pages... I've
created an
example of a functioning and non-functioning page below:
* Functioning (dropdownlist autopostback enabled):
htt
p://www.thebunse.com/test/clickeventfires.aspx
* Not functioning (dropdownlist autopostback disabled):
htt
p://www.thebunse.com/test/clickeventfails.aspx
The code is identical in both pages except for the
auto-postback property of
the dropdownlist.
Any ideas?
Thanks in advance,
Andrew
Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com
|