faqts : Computers : Programming : Languages : JavaScript : DHTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

24 of 27 people (89%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

Can I change the COORDS attribute of an AREA element?
Can I change the COORDS attribute of an AREA element?
Can I change the COORDS attribute of an AREA element?

Mar 21st, 2000 11:00
Martin Honnen,


With full DOM access provided by IE4+ and NN6 (which might be called 
NN6 by marketing hype) it is possible. Just get a reference to the 
HTMLAreaElement e.g.
  var area = document.all ? document.all['areaID'] :
               document.getElementById('areaID');
and change the coords string:
  area.coords = '20, 20, 40, 40';
With NN4 (or older) changing the coords of an area element is not 
possible.