This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply 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: 43

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
Ranch Hand

Joined: Dec 16, 2010
Posts: 386
    
    3

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 have a mind like a steel... uh... thingy."
Divya Chandel
Ranch Hand

Joined: Jun 09, 2011
Posts: 43

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: 56218
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Javascript is not working with IE
 
Similar Threads
Get Rows from a Table
A problem in hiding a button
dynamically expand and collapse table rows
argument in form access
Hidding Table View