473,385 Members | 1,370 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,385 software developers and data experts.

Creating Usemaps with JavaScript for MSIE

sp

Has anyone had an issue creating usemaps for images using Javascript?

The problem I've been having is related to this code:

if(this.topImagePath){
this.titleTopImage = document.createElement("img");
this.titleTopImage.setAttribute("src", this.topImagePath);
this.titleTopImage.setAttribute("display", "block");
this.titleTopImage.setAttribute("usemap", "#close");
this.titleTopImage.setAttribute("style", "border: none");
this.titleElm.appendChild(this.titleTopImage);
}

this.titleMap = document.createElement("map");
this.titleMap.setAttribute("id", "close");
this.titleMap.setAttribute("name", "close");
this.titleElm.appendChild(this.titleMap);

this.titleArea = document.createElement("area");
this.titleArea.setAttribute("shape", "rect");
this.titleArea.setAttribute("coords", "137,3,148,13");
this.titleArea.setAttribute("href", "javascript:
GLT.clickOutElm(true)");
this.titleMap.appendChild(this.titleArea);

What it doesn't do for me is that it doesn't create the usermap for
this area in the MSIE. Whereas the same area seems linked and ready to
go in Firefox. Do you code the usermap differently for MSIE? Or is
there something I'm not seeing here?

Thanks in advance.

Nov 1 '06 #1
1 1672
ASM
sp@k a écrit :
The problem I've been having is related to this code:

if(this.topImagePath){
this.titleTopImage = document.createElement("img");
this.titleTopImage.setAttribute("src", this.topImagePath);
this.titleTopImage.setAttribute("display", "block");
this.titleTopImage.setAttribute("style", "display:block");
this.titleTopImage.setAttribute("usemap", "#close");
this.titleTopImage.setAttribute("style", "border: none");
(snip)
What it doesn't do for me is that it doesn't create the usermap for
this area in the MSIE. Whereas the same area seems linked and ready to
go in Firefox. Do you code the usermap differently for MSIE? Or is
there something I'm not seeing here?
could try direct talk ? (in right order is better)

if(this.topImagePath){
this.titleTopImage = document.createElement("img");
this.titleTopImage.src = this.topImagePath;
this.titleTopImage.style.display = "block";
this.titleTopImage.style.border = "none";
this.titleTopImage.usemap = "#close";
this.titleElm.appendChild(this.titleTopImage);
}

this.titleMap = document.createElement("map");
this.titleMap.id = "close";
this.titleMap.name = "close";

this.titleArea = document.createElement("area");
this.titleArea.shape = "rect";
this.titleArea.coords = "137,3,148,13";
this.titleArea.href = "javascript:GLT.clickOutElm(true)";
this.titleMap.appendChild(this.titleArea);

this.titleElm.appendChild(this.titleMap);
Nov 1 '06 #2

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

Similar topics

1
by: relaxedrob | last post by:
Howdy All! I am really stuck with this one - I want to completely create a table within JavaScript and insert it into the document, with onMouseOut and onMouseOver handlers in the table rows. ...
6
by: Alex Rast | last post by:
First of all, this is not a programming question. I'm a user, not programming in JavaScript. I'm not, however, a novice user or even a power user - I certainly know programming intimately as well...
1
by: Ian Sedwell | last post by:
Hi guys Many thanks to all who replied to my original question. Actually, it's dead easy and the way I was doing it was correct the first time. You do indeed simply call the VBScript routine...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
1
by: oreng | last post by:
Hey all, I have some problems detecting whether the client's browser javascript is enabled at the server side. While Request.Browser.JavaScript only check if the browser enable java script (and...
5
by: sam | last post by:
Hi all, I am dynamically creating a table rows and inerting radio buttons which are also dynamically created. Everything works fine in Firefox as expected. But I am not able to select radio...
5
by: Jason | last post by:
Hi, I have some simple JavaScript on my page that worked for years in IE 6 without an error that I am aware of, but does not work in IE 7. Any insight on this issue that anyone can provide would...
26
by: Prisoner at War | last post by:
Hi, All: I have a JavaScript search engine that always causes MSIE 7 to do a top-of-page security "warning" (that top-of-page-bar, and not an "alert" )...but other websites' JavaScripts do not...
1
by: krogsgaard | last post by:
Hello I've this site www.arg-design.dk/rage I cant get the usemaps to work. Only the first one. Someone who can help me?
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
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: 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...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.