Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Javascript function to specify an image map?

Reply
Thread Tools

Javascript function to specify an image map?

 
 
Jim Van Abbema
Guest
Posts: n/a
 
      12-06-2004
Just beneath my row of navigation buttons, I am using rollovers to bring up
different graphic images, each which have been mapped with several links.
Of course, each graphic requires its own image map. What script can I use
to bring up the correct image map when its respective graphic is displayed?

Thanks,
Jim Van Abbema



 
Reply With Quote
 
 
 
 
NOXwebmasterx@xmbstevensx.com
Guest
Posts: n/a
 
      12-06-2004
Jim Van Abbema wrote:

> Just beneath my row of navigation buttons, I am using rollovers to bring
> up different graphic images, each which have been mapped with several
> links.
> Of course, each graphic requires its own image map. What script can I use
> to bring up the correct image map when its respective graphic is
> displayed?



Don't use a script.
See thread 11/30/04 "How to create rollovers in imagemaps"



 
Reply With Quote
 
 
 
 
Jim Van Abbema
Guest
Posts: n/a
 
      12-07-2004

<> wrote in message
news:kj5td.8659$ ink.net...
> Jim Van Abbema wrote:
>
>> Just beneath my row of navigation buttons, I am using rollovers to bring
>> up different graphic images, each which have been mapped with several
>> links.
>> Of course, each graphic requires its own image map. What script can I
>> use
>> to bring up the correct image map when its respective graphic is
>> displayed?

>
>
> Don't use a script.
> See thread 11/30/04 "How to create rollovers in imagemaps"
>


This really doesn't answer my question. The rollover functions
independently of the image maps. When the graphic is displayed, I need to
ensure that the respective specific image map is in use.


 
Reply With Quote
 
NOXwebmasterx@xmbstevensx.com
Guest
Posts: n/a
 
      12-07-2004
Jim Van Abbema wrote:

>
> <> wrote in message
> news:kj5td.8659$ ink.net...
>> Jim Van Abbema wrote:
>>
>>> Just beneath my row of navigation buttons, I am using rollovers to bring
>>> up different graphic images, each which have been mapped with several
>>> links.
>>> Of course, each graphic requires its own image map. What script can I
>>> use
>>> to bring up the correct image map when its respective graphic is
>>> displayed?

>>
>>
>> Don't use a script.
>> See thread 11/30/04 "How to create rollovers in imagemaps"
>>

>
> This really doesn't answer my question. The rollover functions
> independently of the image maps. When the graphic is displayed, I need to
> ensure that the respective specific image map is in use.


I could be wrong, but I doubt anyone is going to serve up exactly what you
want. You'll have to apply the known methods recursively as you move down
through images. I still suggest the non-script solution. Old-style image
maps have accessibility problems. Read the article at alistapart, and I
think you'll be able to come up with a solution. Also have a look at the
work done at:
http://www.meyerweb.com/eric/css/edge/index.html
....which again may not be ecactly what you want. Make modifications to
your needs.



 
Reply With Quote
 
mscir
Guest
Posts: n/a
 
      12-07-2004
wrote:

> Jim Van Abbema wrote:
>
>><> wrote
>>
>>>Jim Van Abbema wrote:
>>>
>>>>Just beneath my row of navigation buttons, I am using rollovers to bring
>>>>up different graphic images, each which have been mapped with several
>>>>links.
>>>>Of course, each graphic requires its own image map. What script can I
>>>>use
>>>>to bring up the correct image map when its respective graphic is
>>>>displayed?
>>>
>>>
>>>Don't use a script.
>>>See thread 11/30/04 "How to create rollovers in imagemaps"

>>
>>This really doesn't answer my question. The rollover functions
>>independently of the image maps. When the graphic is displayed, I need to
>>ensure that the respective specific image map is in use.

>
> I could be wrong, but I doubt anyone is going to serve up exactly what you
> want. You'll have to apply the known methods recursively as you move down
> through images. I still suggest the non-script solution. Old-style image
> maps have accessibility problems. Read the article at alistapart, and I
> think you'll be able to come up with a solution. Also have a look at the
> work done at:
> http://www.meyerweb.com/eric/css/edge/index.html
> ...which again may not be ecactly what you want. Make modifications to
> your needs.


Maybe you can use this approach, it uses multiple images, each using a
unique image map (I only included 2 maps here as an example).

By changing the visibility property of the grahpics, you automatically
select which image map is in use. This approach has several graphics
that are the same size, that have the same 'main menu' choices on their
left sides, and individual 'sub-menu' choices on their right sides.
Moving the mouse over the main menu areas changes which graphic/imagemap
combination is in use, and displays the appropriate submenu choices on
the right side.

<style type="text/css">
img {
border: 0;
visibility: hidden;
position: absolute;
top: 10px;
left: 10px
width: 540px;
height: 540px;
}
</style>

<SCRIPT type="text/javascript">
var lasttype=10101;
function LoadMenu (type) {
if (type==lasttype)
return true;
for (var n=0; n<6; n++)
if (n==type)
document.images[n].style.visibility="visible";
else
document.images[n].style.visibility="hidden";
lasttype=type;
return true;
}

</SCRIPT>
</HEAD>

<BODY>
<IMG src="mainmenu.jpg" usemap="#mainmenumap"
style="visibility:visible;">
<IMG src="frozenfood.jpg" usemap="#submenumap1">
<IMG src="freshfood.jpg" usemap="#submenumap2">
<IMG src="beverages.jpg" usemap="#submenumap3">
<IMG src="homehealth.jpg" usemap="#submenumap4">
<IMG src="petfood.jpg" usemap="#submenumap5">

<map name="submenumap1" id="submenumap1">
<area shape="rect" coords="7, 57, 167, 143" onmouseover= "LoadMenu(1)">
<area shape="rect" coords="7, 153, 167, 239" onmouseover= "LoadMenu(2)">
<area shape="rect" coords="7, 249, 167, 334" onmouseover= "LoadMenu(3)">
<area shape="rect" coords="7, 347, 167, 430" onmouseover= "LoadMenu(4)">
<area shape="rect" coords="7, 449, 167, 527" onmouseover= "LoadMenu(5)">
<area shape="rect" coords="191,87,533,120" HREF = "large.htm">
<area shape="rect" coords="191,121,533,152" HREF = "small.htm">
</map>

<map name="submenumap3" id="submenumap3">
<area shape="rect" coords="7, 57, 167, 143" onmouseover= "LoadMenu(1)">
<area shape="rect" coords="7, 153, 167, 239" onmouseover= "LoadMenu(2)">
<area shape="rect" coords="7, 249, 167, 334" onmouseover= "LoadMenu(3)">
<area shape="rect" coords="7, 347, 167, 430" onmouseover= "LoadMenu(4)">
<area shape="rect" coords="7, 449, 167, 527" onmouseover= "LoadMenu(5)">
<AREA SHAPE="RECT" COORDS="192,83,534,55" HREF="tea.htm" TITLE="Tea">
<AREA SHAPE="RECT" COORDS="192,115,532,87" HREF="eg25.htm" TITLE="earl
grey 25 bags">
<AREA SHAPE="RECT" COORDS="192,147,534,119" HREF="eg100.htm"
TITLE="earl grey 100 bags">
<AREA SHAPE="RECT" COORDS="194,181,532,149" HREF="eg200.htm"
TITLE="earl grey 200">
</map>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Do You Specify DPI in .png Image File Steve Yates Java 6 08-10-2009 04:41 PM
Specify Image location in Web.Config Manny Chohan ASP .Net 7 02-22-2008 08:12 PM
Image adding border-width:0; when I do not specify the BorderWidth property Nathan Sokalski ASP .Net 1 11-07-2007 04:30 PM
Specify the size of an image Jsp HTML 2 01-16-2005 10:39 PM
Function to specify a certain image map? Jim Van Abbema Javascript 1 12-07-2004 01:52 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57