Try this: <script> function getColSpan(){ chld = mytable.rows[0].cells[0]; alert(chld.getAttribute("colspan",0)); } </script> </head>
<body> <table id="mytable"> <tr> <td colspan=2><button onClick="getColSpan()">getColSpan</button></td> </tr> <tr> <td></td> <td></td> </tr> <tr> <td></td> <td></td> </tr> </table> -----Original Message----- From: [Vaishali S. Pandya] [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 4:12 AM To: [EMAIL PROTECTED] Subject: u can not get COLSPAN in javascript i have tried a lot and don't able to know colspan of mytd which is <td id="mytd" width="10%" colspan=5> in alert(mytd.id) alert(mytd.width) alert(mytd.colspan) it gives me mytd 10% undefined Why? Vaishali Relience Ind Ltd A'bad =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com