File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
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: 61601
    
  67

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaScript code works in firefox but not in IE8