[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 161
  • Last Modified:

clear text & radio

How would I accomplish this?

for each ctl in controls
  if typeof ctl is textbox then ctl.text=""
  if typeof ctl is radiobutton then ctl.checked=false

But I get "checked is not a member of forms.control" : \
0
sirbounty
Asked:
sirbounty
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
Hi sirbounty,

You have to cast your CTL object variable
  if typeof ctl is radiobutton then ctype(ctl, radiobutton).checked=false


Cheers!
0
 
sirbountyAuthor Commented:
Thanx, as always! :)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now