Any way to read custom html attributes in firefox/opera ?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Any way to read custom html attributes in firefox/opera ?

From: <andyjgw@gmail.com>
Date: Thu Jun 30 2005 - 17:59:50 CEST

Hi

Just a quick question - I guess this is more a 'standards' thing than
anything else.

I'm working on a digital mapping application. One of the things I'm
doing is outputting the IMG tag thus (just a sample):

< img id="myMap" src="somemap.gif" northing="1" easting="2" >

The reason I'm doing this is I'm looking to output some useful
information into the page from my asp.net source without resorting to
'tricks' like hidden input fields etc but still have them visible to
client-side JS.

In IE, I can read document.getElementById("myMap").northing, but when I
try this in Opera/Firefox these custom attributes aren't available.

Does anyone have any suggestions as to what I can do here?

Thanks in advance
AW
Received on Tue Oct 18 02:50:27 2005