Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > ASP Forms
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 22nd, 2003, 06:47 AM
Authorized User
Join Date: Aug 2003
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to disable html Form instead Form Elements

hi guys is it possible to disable all form element once?
i mean can i disable form directly instead form elements so that
all form elements inside form will disable?

Thanks in advance

  #2 (permalink)  
Old August 24th, 2003, 01:41 AM
Authorized User
Join Date: Jun 2003
Location: Quezon City, MM, Philippines.
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to planeswalk


You can't put a "disabled" attribute in the form tag but you can put the following into your code and call it using the body tag's onLoad event.

<script language="Javascript">
  function disable() {
    var limit = document.forms[0].elements.length;
    for (i=0;i<limit;i++) {
      document.forms[0].elements[i].disabled = true;


Marlon Villarama
Support Team
Web Burner Hosting
Toll-Free: 877-535-2876
  #3 (permalink)  
Old April 27th, 2004, 01:48 PM
Registered User
Join Date: Apr 2004
Location: Boston, MA, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

What if I want to disable it on some condition.
Can anyone please let me know how we can do it
ie if a flag is true then disable the whole form
else no.


  #4 (permalink)  
Old April 27th, 2004, 01:53 PM
Friend of Wrox
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts


It is possible to assign the function to an event. Just include the function posted by Marlon and assign it to an event like this:

document.onclick = disable;

Let me know if there is a different kind of condition you mean.




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to disable form design ? sms Access 2 May 19th, 2008 02:06 AM
Converting an HTML Form to ASP.Net Form k_alidxb75 ASP.NET 1.x and 2.0 Application Design 0 November 30th, 2006 03:26 AM
Enable/Disable Form Elements Question kwilliams Javascript 4 February 28th, 2006 11:28 AM
Looping through form elements trekmp VS.NET 2002/2003 1 May 11th, 2004 11:01 AM
Disable Form Elements Hotwax ASP.NET 1.0 and 1.1 Professional 2 October 31st, 2003 08:11 AM

All times are GMT -4. The time now is 06:07 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.