• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript is not working with IE

 
Divya Chandel
Ranch Hand
Posts: 47
MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to hide html table row using javascript the code for that is below-



This code is working fine with all the browsers except IE.
Please help me.






Thank you.
 
J. Kevin Robbins
Bartender
Posts: 1725
19
Chrome Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, please use code tags when posting code. Second, if this is the actual code there are many things wrong. There are no html or body tags, you are missing attributes for the form tag, and you are trying to declare a name attribute for td elements which is not allowed.

The first step is to create valid html. Then debug the JS. Try assigning ID's instead of names and then use getElementById. Come back here with the results after you've done those things.
 
Divya Chandel
Ranch Hand
Posts: 47
MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jk Robbins wrote:First, please use code tags when posting code. Second, if this is the actual code there are many things wrong. There are no html or body tags, you are missing attributes for the form tag, and you are trying to declare a name attribute for td elements which is not allowed.

The first step is to create valid html. Then debug the JS. Try assigning ID's instead of names and then use getElementById. Come back here with the results after you've done those things.



I make the changes,actually this is the simple code,in my actual code I am generating table rows dynamically,because of requirement I am using getElementByName.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please repost the updated code. UseCodeTags, and make sure that code is properly indented.

Yes, I know you said the code was generated, so it's likely all wonky, bit take the time to reformat it for posting.

And as already pointed out -- if the HTML is invalid, all bets are off. Make suer that the markup is valid before trying to use script on it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic