chirs wrote on 26 nov 2003 in comp.lang.javascript
:
What are the menu and cmd attributes in the following code? I could
not find the information for these two attributes to be used in a
<DIV> tag. Someone told me that you can define customised attribute
for <DIV> tag. Is that true? Thank you. Here is the code:
<DIV class=Bar id=Bar1 menu="menu1" target='_top"'
cmd="/app/login/ctrl.jsp?cmd=pipeline.main">Pipeline</DIV>
I found the target tag in O'Reilly book called Dynamic HTML The
Definitive Reference on Page 240. But I can't find it in www.w3c.org.
IE6, at least, will let you do this:
=========================
<DIV class=Bar id=Bar1 menu="menu1" target='_top"'
cmd="/app/login/ctrl.jsp?cmd=pipeline.main">Pipeline</DIV>
<br>
<script>
document.write(Bar1.menu+"<br>");
document.write(Bar1.cmd+"<br>");
document.write(Bar1.className+"<br>");
document.write(Bar1.innerText+"<br>");
document.write(Bar1.target+"<br>");
</script>
==========================
The id as globalised object is however not universal.
btw: This will be only slightly usefull in IE:
==========================
<DIV
onclick='location.href=cmd'
cmd="http://cnn.com">
Pipeline</DIV>
==========================
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)