Go Back   HTMLCenter Web Development Forums > Web Design and Development > Programming and Scripting
Connect with Facebook

How to change Non editable textfiled to editable textfiled from Javascript

Closed Thread
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-25-2009, 08:48 AM
Registered User
 
Join Date: May 2009
Posts: 23
How to change Non editable textfiled to editable textfiled from Javascript

Hi,

How to change Non editable textfiled to editable textfiled from Javascript

I got some textfield in the website I am making,
Residense Add and Contact Add

When browser loads Contact Add textfiled id noneditable (readonly),

But if the user click a radio Button ( Which indicates Contact Add is diff from Resi Add) then I want Contact Add to be editable.

Thanks,

Venkat.

  #2 (permalink)  
Old 06-27-2009, 07:53 AM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,533
You're going to need to know the ID of the contact add field. Then, do something like this:
Code:
function checkRadio(what) {
if(what.checked) {
document.getElementById('contactAdd').readonly = false;
}
else {
document.getElementById('contactAdd').readonly = true;
}
}
Then, call the "checkRadio" function in the onClick event for your radio button.
__________________
I hate Internet Explorer! Anyone with me?
  #3 (permalink)  
Old 06-29-2009, 07:37 AM
Registered User
 
Join Date: May 2009
Posts: 23
Thanks for ur reply.

I was not knowing readonly takes True|false value

Thanks,

Venkat
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript cookie - show/hide with css sgweaver Programming and Scripting 2 07-09-2009 01:30 PM
How to validate integer in JavaScript sarumajik Programming and Scripting 4 06-04-2009 01:34 PM
Trying to combine Slideshow javascript and transparent PNG files moez Programming and Scripting 0 01-23-2006 09:38 AM
How To: Change characters in a textarea? Using Javascript locks Programming and Scripting 2 03-11-2005 02:33 AM


All times are GMT -5. The time now is 04:43 PM.

 
Clicky Web Analytics
CloudContacts
Loop11
Page.ly


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.1 PL1
© 1997-2009 HTMLCenter