Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 6th, 2005, 11:24 AM
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default Disable text box?

I am unable to find a VBScript example of how to disable an HTML form field. Below is is a line of code I've tried to translate from JavaScript. It doesn't seem to generate any errors but neither does it disable the radio buttons associated with the field name. What is wrong with it?

frmSurvey.fldAnswer5.Disabled=false

fldAnswer5 is the NAME attribute on two radio buttons. Neither button is disabled when this script is executed.
Reply With Quote
  #2 (permalink)  
Old May 6th, 2005, 11:44 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Try this:

frmSurvey.fldAnswer5.Disabled=True

mmcdonal
Reply With Quote
  #3 (permalink)  
Old May 9th, 2005, 09:29 AM
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

Oops. Used to doing things in REAL VB and read Disabled as Enabled every time I looked at this line.
Reply With Quote


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count in combo box(display results in text box) mboyisis Access 4 April 4th, 2008 07:08 AM
Disable the history from text box surendra.parashar ASP.NET 2.0 Basics 3 February 2nd, 2007 07:37 PM
grey out (or disable) a text box crmpicco HTML Code Clinic 2 January 20th, 2005 06:13 PM
grey out (or disable) a text box crmpicco Classic ASP Basics 1 January 20th, 2005 01:48 PM





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