aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Javascript is not working with IE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript is not working with IE" Watch "Javascript is not working with IE" New topic
Author

Javascript is not working with IE

Divya Chandel
Ranch Hand

Joined: Jun 09, 2011
Posts: 47

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.


Divya
SCJP1.6
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 1039
    
  13

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.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
Divya Chandel
Ranch Hand

Joined: Jun 09, 2011
Posts: 47

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

Joined: Jan 10, 2002
Posts: 61627
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript is not working with IE