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 Help on conditionally disabling the fields Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Help on conditionally disabling the fields" Watch "Help on conditionally disabling the fields" New topic
Author

Help on conditionally disabling the fields

ms raaghu
Ranch Hand

Joined: Jul 10, 2009
Posts: 66
hi,
I have two radio button say
radio 1 and 2 respectively..
and a text field.. ..... on page load the radio 1 will be selected
so based on that condition textfield shld be disabled ?
please let me know how can i achieve this.. ?

i have written a function where on change the textfield will be disabled but when the page refreshed the disability
is gone for a toss...so please tell how dis can be done??
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

ms raaghu wrote:how dis can be done??

dis? What is "dis"?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ms raaghu
Ranch Hand

Joined: Jul 10, 2009
Posts: 66
Sorry "dis" refers to "THIS"
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
on window.onload look at what the radio button is set to and call your function that enables and disables.

Eric
 
 
subject: Help on conditionally disabling the fields
 
Similar Threads
refreshing the page when radio button clicked
doubt in getParameter()
Auto Populate Combo Box upon Radio Selection
validating textfield with +ve/-ve values using 2 radiobuttons
get disabled values from HttpServletRequest parameter