aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes JavaScript code works in firefox but not in IE8 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "JavaScript code works in firefox but not in IE8" Watch "JavaScript code works in firefox but not in IE8" New topic
Author

JavaScript code works in firefox but not in IE8

Jacky S Zhang
Greenhorn

Joined: Jul 21, 2010
Posts: 13
I have a piece of code:



What it does is: when page loaded, only the first input text box is editable, after input something, the second input text box is editable, then the third, and so on...

It works fine in firefox but not in IE8. However in IE8, only the first is editable... So means in IE8, set readonly and remove readonly should work. Seems to me this condition (event.data.element.get(current).textLength > 0) never get true. Any idea?

Jacky
Jacky S Zhang
Greenhorn

Joined: Jul 21, 2010
Posts: 13
Resolved.. textLength property doesn't got supported in IE8, changed to following code works in both IE8 and fireFox...

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56528
    
  14

As the problem turned out to have nothing to do with jQuery, I adjusted the topic title accordingly.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JavaScript code works in firefox but not in IE8
 
Similar Threads
read a text file display values in drop down menu
about checking values between rows with dynamic table created using java script
making readonly form fields editable dynamically
JS code not working.
translate from English to Hindi