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

<DIV> tag

Hi,

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.

Chris
Jul 20 '05 #1
2 9578


chirs wrote:
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.


Those attributes are indeed not part of HTML 4's <div> element. Thus
they are custom attributes defined by the page author. Depending on the
browser you can read them as
elementObject.getAttribute('target')
respectively
elementObject.target
The first should work with Netscape 6/7, IE5+, Opera 7, the second with
IE4+.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
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)
Jul 20 '05 #3

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

Similar topics

13
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to...
1
by: Philo | last post by:
How do I select all <div> tags except those which contain a <table> tag somewhere within them? Example XML: <********************** sample input ***********************> <txtSectionBody>...
3
by: Paul Thompson | last post by:
When I put a <div ...> inside a <table> specification, functionality is not there. When I put the <table> inside the <div> everything works. Why is that?
8
by: Daniel Hansen | last post by:
I know this must seem totally basic and stupid, but I cannot find any reference that describes how to control the spacing between <p>...</p> and <div>...</div> blocks. When I implement these on a...
8
by: slim | last post by:
hi again all, i am still working on the website as mentioned in earlier threads and have hit another snag... http://awash.demon.co.uk/index.php http://awash.demon.co.uk/vd.css the php is...
6
by: Marcus Otmarsen | last post by:
Ok, the situation is as follows: I defined a <DIV> like: <div id="myid" style="position: absolute; height: 10; width: 10;"><img src="images/object.gif" height=10 width=10></div> This pane is...
3
by: Josef K. | last post by:
Asp.net generates the following html when producing RadioButton lists: <td><input id="RadioButtonList_3" type="radio" name="MyRadioButtonList" value="644"...
28
by: Kent Feiler | last post by:
1. Here's some html from a W3C recommendations page. <P>aaaaaaaaa<DIV>bbbbbbbbb</DIV><DIV>cccccccc<P>dddddddd</DIV> 2.Although I didn't think it would make any difference, I tried it with the...
5
by: Agix | last post by:
Hi there, Please check out : http://clarifysolutions.co.uk/certenroll/ The source is included below. This page is a test, so I can play about with paddings, margins and layouts using divs as...
8
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.