473,378 Members | 1,156 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Referencing an Image's Map's Link's Details

Hi All,

I have scoured my JavaScript book, but can't find the answer, so I
hope that you can help...

I have a banner on my webpage, called (creatively) "banner".
This banner uses a map called "bannerMap".
The map has an area called "homeLink".
The area's href is "home.htm".

How do I reference this href?

I have tried:
document.bannerMap.homeLink.href - FAILED
document.banner.bannerMap.homeLink.href - FAILED
document.homeLink.href - FAILED
document.banner.homeLink.href - FAILED

Has anyone tried this before? Is it possible? What is the answer?!

Thanks
Luke
Jul 20 '05 #1
1 1567
is****@hotmail.com (Lucanus) writes:
I have a banner on my webpage, called (creatively) "banner".
This banner uses a map called "bannerMap".
The map has an area called "homeLink".
I assume you mean name="homeLink" or id="homeLink". It is recommended
to use id. Then, if all else fails, you can do
document.getElementById("homeLink")
The area's href is "home.htm". How do I reference this href?
Try:
document.links['homeLink'].href
document.bannerMap.homeLink.href - FAILED
document.banner.bannerMap.homeLink.href - FAILED
document.homeLink.href - FAILED
document.banner.homeLink.href - FAILED


You shouldn't assume that the name of an element can be used as a
property name of document (or window, or anything except for the
appropriate collections).

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Stanimir Stamenkov | last post by:
I have this kind of construct: http://www.geocities.com/stanio/temp/usemap01.html (an IMG element using MAP described with AREA elements) I'm trying to make it more accessible and currently...
10
by: sling blade | last post by:
Hello, I have an image map of a subdivision and each section of land in the subdivision has a lot number on it. Below the image map I have a table with details about each lot (eg Lot Number, Lot...
4
by: Jim Land | last post by:
I've got an image and an image map, and they work fine together. See it here: http://www.jim-land.com/testing/MapPage01.htm But the image map has way too many points (vertices) in its 87...
5
by: Jerry | last post by:
Hello! I have an image that uses an image map for navigation. We would like a pull-down menu to appear when the user mouses over the link. The pull-down menu is another image that was created to...
3
by: Andy Baxter | last post by:
I have an image scrolling in a viewport for a panoramic image viewer. The viewport can be resized to several set resolutions so people can adjust the size according to their bandwidth. There are...
6
by: David Stone | last post by:
I have a simple question about the alt content of area elements within an image map: is it redundant to include phrases such as "link to..." or "jump to..."? My initial thought is 'yes', since...
0
by: Independent | last post by:
Python programmers may find the application to decoding an encrypted map image format known as Memory Map to produce a standard PNG image file interesting. Someone obviously very well versed in...
1
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.