JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 26th, 2005, 01:40 PM
ZLA ZLA is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Location: Saint Louis, MO
Posts: 13 ZLA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 46 m 37 sec
Reputation Power: 0
Adding Area Maps programmatically

I have a grid based graphic that will contain image maps for each of the many cells of the grid. Though I can build the area tags on the server, this will generate more html than I want to send from server to client, as follows:

Code:
<Area Shape="rect" Coords="0,0,5,5" Href="javascript:clickCell(0,1);">
<Area Shape="rect" Coords="5,0,10,5" Href="javascript:clickCell(0,2);">
<Area Shape="rect" Coords="10,0,15,5" Href="javascript:clickCell(0,3);">
etc...	


I found a link (http://www.siteexperts.com/dhtml/ch9/chapter/part4.asp) that shows I can add area maps programmatically using DHTML. Using that code I could write javascript something like

Code:
var elArea = document.createElement("AREA");
elArea.coords = "10,0,15,5";


I have two questions:
1) Will this technique work in a browser other than IE? That is do other DOMs support the creation of area elements programmatically?
2) If I can use this technique, can I add the area's javascript HREF as I indicated above? If so, how?

Thank you for any assistance you can lend me.

ZLA

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Adding Area Maps programmatically


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT