Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaScript code works in firefox but not in IE8

 
Jacky S Zhang
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As the problem turned out to have nothing to do with jQuery, I adjusted the topic title accordingly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic