I have an asp.net site that uses a dropdown listbox to select 1 of 6 different images to be displayed at one time. Changing the image is working fine. But I need to define and use a different set of coordinates for each image. One image could have as few as 5 regions, while another could have up to 100. The coordinates will be hardcoded but I can't seem to figure out how to load different sets of "PolygonHotspot" based on which image is displayed. I thought it was going to be as easy as assigning an ID to 100 different hotspots, then turning them off or on and defining the coordinates based on the image name. That seemed like the perfect solution .. until I found out that the PolygonHotspot doesn't have an ID property.
Any help would be GREATLY appreciated! Please email me at bry at herp dot com
Thank you in advance,
Bryan Mohr
1 2371
Just for reference (even though this doesn't work), here is the code that I was hoping would work: -
Protected Sub cbImageCombo_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbImageCombo.TextChanged
-
Dim strImageName As String = cbImageCombo.Text
-
Dim strImageText As String = strImageName
-
-
strImageName = "~/Images/" & strImageName.Replace(" ", "_") & ".JPG"
-
imImage.ImageUrl = strImageName
-
imImage.AlternateText = strImageText
-
-
' First Make all Hotspots inactive
-
HS001.HotspotMode = "Inactive"
-
HS002.HotspotMode = "Inactive"
-
HS003.HotspotMode = "Inactive"
-
-
' Next activate the defined hotspots for the currently selected image
-
If (strImageText = "Spinal Cord Side") Then
-
HS001.HotSpotMode = "PostBack"
-
HS001.AlternateText = "Top Vertebrae"
-
HS001.Coordinates = "118,16,127,11,135,4,142,4,154,11,155,16,154,17,143,15,139,15,132,22,118,17,118,17"
-
HS001.PostBackValue = "Top Vertebrae"
-
-
HS002.HotSpotMode = "PostBack"
-
HS002.AlternateText = "Second Vertebrae"
-
HS002.Coordinates = "118,32,131,24,131,22,139,15,154,17,156,32,141,25,138,25,137,27,137,29,121,38,119,36"
-
HS002.PostBackValue = "Second Vertebrae"
-
End If
-
-
If (strImageText = "Skeleton Front") Then
-
HS001.HotSpotMode = "PostBack"
-
HS001.AlternateText = "Skull"
-
HS001.Coordinates = "120,14,126,7,134,3,138,3,146,6,151,11,154,17,154,27,152,39,148,41,148,49,142,53,132,53,125,49,125,43,124,39,121,35,121,32,119,28,119,16"
-
HS001.PostBackValue = "Skull"
-
End If
-
-
If (strImageText = "Muscular Man Back") Then
-
HS001.HotSpotMode = "PostBack"
-
HS001.AlternateText = "Lateral Deltoid - Right"
-
HS001.Coordinates = "172,82,180,80,187,79,189,80,194,84,198,89,200,95,201,99,202,107,201,115,192,106,185,98,184,90,178,88,174,85"
-
HS001.PostBackValue = "Lateral Deltoid - Right"
-
-
HS002.HotSpotMode = "PostBack"
-
HS002.AlternateText = "Posterior Deltoid - Left"
-
HS002.Coordinates = "100,97,101,114,86,128,81,126,90,107"
-
HS002.PostBackValue = "Posterior Deltoid - Left"
-
-
HS002.HotSpotMode = "PostBack"
-
HS002.AlternateText = "Levator Scapulae - Left"
-
HS002.Coordinates = "109,75,127,64,132,57,130,73,112,76"
-
HS002.PostBackValue = "Levator Scapulae - Left"
-
End If
-
End Sub
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Csaba2000 |
last post by:
I want to be able to programatically click on the center of an <INPUT type=image ...> element (I only care about IE
5.5+). This should work regardless of whether IE has focus. Normally you would...
|
by: Tony Gahlinger |
last post by:
I'm using my browser (Mozilla/5.0 Linux i686 Gecko/20031007 Firebird/0.7)
to do some client-side image processing. I want to capture the sequence of
coordinates a user clicks on in xxx.jpg in the...
|
by: pablo |
last post by:
Dear NGers,
I would like to change the alt-text with the changing of the image during a
mouseover action.
Can document.images.altView be changed dynamically?
TIA,
pablo
|
by: Asaf Dan |
last post by:
Hi,
I'm using a panel to show an image.
The Image could be bigger or smaller than the panel.
I want to show the pixel coordinates of the image on a label next to the
panel.
I'm using an event...
|
by: Donald Xie |
last post by:
Hi,
I noticed an interesting effect when working with controls that are
dynamically loaded. For instance, on a web form with a PlaceHolder control
named ImageHolder, I dynamically add an image...
|
by: Tomasz Bak |
last post by:
Hello,
I have a simple problem: mark a list of defects
on an image.
I think the best way to do it is to select a single
deffect, then take two coordinates of coursor
form an image on a web...
|
by: jackiepatti |
last post by:
QUESTION:
I have a web page containing a form that contains an image instead of a
submit button, e.g.
<form name='myform' action='get' method='otherpage.asp'>
<input type='image'...
|
by: petethebloke |
last post by:
Can anyone help? I have a client who has made a "dynamic interactive
map" of our city using Dreamweaver. Each map file has hotspots that
pop-up a div with a little image when the mouse goes over...
|
by: nvinhphu |
last post by:
Dear all,
I would like to generate images like the ones in the right column at
this link
http://www.micthemodel.org/pages/examples.html (Sorry but I can not
post
attachment).
These images...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |