File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using jQuery to Disable Text Box

 
Steve Dyke
Ranch Hand
Posts: 1602
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the following function to attempt to disable input but it is not working:

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"not working" isn't helpful. Please read ItDoesntWorkIsUseless.

Try .attr() instead of .prop().
 
Keith Wood
Author
Ranch Hand
Posts: 38
jQuery
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
prop is the correct function to call. However, I suspect that the field you are trying to disable is part of the new content that comes from the load call. If that is the case, then you must only try to access it in the completed callback from the load.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah yes, if that's the case then the element won't yet exist when the statement is executed. Though I'd use the success callback rather than the complete callback (which is also called in the event of an error).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic