Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes How to enable text fileds 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 "How to enable text fileds" Watch "How to enable text fileds" New topic
Author

How to enable text fileds

Raaja Gotluru
Ranch Hand

Joined: Mar 02, 2010
Posts: 108
Hi,

I am having a page where some checkboxes and text boxes are there. Intially the text boxes will be disabled. If I select a checkbox then the corresponding text box should be enaled. I I am able to do this.

But if a user selects a checkbox, enters the text and submit and comes back by pressing browser back navigation button. The checkbox will be ticked but text box is in disabled condition with the value entered.

I tried with the following but it is not working



I tried with this also





This is not working in chrome only. It is working fine in Firefox. Can any one guid eme in this.
Rob Crowther
author
Ranch Hand

Joined: Nov 06, 2012
Posts: 295
    
    5

Listen to the pageshow event, the load event is not fired by the back button.


Read my books: Hello! HTML5 & CSS3 | HTML5 in Action | Read my blog
Raaja Gotluru
Ranch Hand

Joined: Mar 02, 2010
Posts: 108
Hi Rob,

Thanks for the reply. But in my case it is not working in Chrome. Working fine in Firefox.

I tried pageshow event also. But it is also not working.

Any other way to solve this.
Rob Crowther
author
Ranch Hand

Joined: Nov 06, 2012
Posts: 295
    
    5

How did you try with the pageshow event? Post your code.
Raaja Gotluru
Ranch Hand

Joined: Mar 02, 2010
Posts: 108
Hi Rob,

I tried like this in document.ready it worked

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to enable text fileds
 
Similar Threads
Errors saving data from a checkbox.
Enable/Disable a Button
jQuery and checkbox
struts, .click, names, jQuery