User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 426,478 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,232 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1157 | Replies: 2
Reply
Join Date: Jun 2007
Posts: 4
Reputation: praveen_kr541 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
praveen_kr541 praveen_kr541 is offline Offline
Newbie Poster

Help urgent- i have dead line

  #1  
Jun 30th, 2007
Here in my project i am using this reference to know my current name of td. Below i provided sample code similar to my project. "this" won't working in Mozilla. I am migrating my project to Mozilla . So please help me.

<html>
   <head>
    <script>
        function f(a)
        {
          alert(a);
        }
    </script>
   </head>

   <body>
        <table border="1">
             <tr>
                  <td name="dfdsfs11111111" onclick="f(this.name)">sadasd</td>
                  <td name="dsfdsfsd222222" onclick="f(this.name)">asdasd</td>  
             </tr>

        </table>

   </body>
</html>
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,858
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 344
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: urgent- i have dead line

  #2  
Jul 1st, 2007
According to the standards, <td> doesn't have a 'name' attribute and neither does <tr> or <table> as a matter of fact. IE supports it, Opera doesn't, Firefox doesn't. IE is infamous of supporting non standard things.

The only thing you can do is to replace each occurrence of 'name' with 'id' attribute since each element supports the 'id' attribute.

See this example to know more:
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function doName(name)
  5. {
  6. alert("ID: " + name.id);
  7. alert("Name: " + name.name);
  8. }
  9. </script>
  10. </head>
  11. <body>
  12. <table id="TABLE" name="TABLE" onclick="doName(this);" border="1">
  13. <tr id="TR" name="TR" onclick="doName(this);">
  14. <td id="TD" name="TD" onclick="doName(this);">CLICK ON ME</td>
  15. </tr>
  16. </table>
  17. </body>
  18. </html>
Last edited by ~s.o.s~ : Jul 1st, 2007 at 1:39 am.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Join Date: Jul 2007
Posts: 8
Reputation: Voynex is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 2
Voynex Voynex is offline Offline
Newbie Poster

Re: urgent- i have dead line

  #3  
Jul 24th, 2007
Yes, name attribute is deprecated in XHTML
voynex.com - high quality software and web development.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 4:08 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC