Digital Point Forums
Winn Law Group

Go Back   Digital Point Forums > Design & Development > Programming > JavaScript
Google Analytics
Log In to view
your analytics

Reply
 
Thread Tools
  #1  
Old Jun 16th 2005, 3:59 pm
ZeroOne ZeroOne is offline
Peon
 
Join Date: Jun 2005
Posts: 1
ZeroOne is on a distinguished road
Disabling and enabling the form text fields

Can I make the form text fields disable and when click on text fields it change

to enable.

I try to do that but it not work :
Code:
<SCRIPT LANGUAGE="JavaScript">
function enable() {
document.formname.textname.disabled=false;
}
</SCRIPT>

<form name="formname" method="POST" action="">
<input type="text" disabled size="10" name="textname" onclick="enable()">
....
.
my another question is if the name of the input text is array like :
<input type="text" size="10" name="textname[]" >
how i can deal with it in javascript code (document.formname.(here))

Thanks
Reply With Quote
  #2  
Old Jun 16th 2005, 7:48 pm
J.D. J.D. is offline
of the Nightfall
 
Join Date: Nov 2004
Posts: 1,198
J.D. has a spectacular aura aboutJ.D. has a spectacular aura about
Quote:
Originally Posted by ZeroOne
Can I make the form text fields disable and when click on text fields it change

to enable.
<form>
<input id="i1" type="text" size="10" name="textname" onclick="this.disabled = true">
<input type="button" name="textname" value="toggle" onclick="this.form.i1.disabled = !this.form.i1.disabled">
</form>


J.D.
Reply With Quote
Reply

Bookmarks

Thread Tools

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
PayPal Option Fields macdesign Payment Processing 5 Today 5:20 am
Enabling Yahoo/MSN support vincenzo Keyword Tracker 11 Apr 11th 2005 7:00 am
Auto completing fields JenS Optigold ISP 7 Mar 7th 2005 8:31 am
Google foraying into new fields ? nriweb Google 6 Sep 25th 2004 4:28 pm
Form Text Table Background - making it fixed misohoni Programming 3 Jul 27th 2004 5:19 am


All times are GMT -8. The time now is 5:20 pm.