dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Web
Expertise: Intermediate
Nov 29, 1999

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Unselect All Radio Buttons in Visual InterDev

When the Visual InterDev Scripting Object Model (SOM) creates an option group object (a set of radio buttons), it selects the first radio button when the page loads. You may not want to "influence" the user's choice by allowing a default selection.

Although there's no way to unset this default property using the design-time control, there is a method. You can use VID's onbeforeserverevent, the firstentered property, and a little JavaScript to unselect all the buttons when the page first appears. The following code inserts a call to the clearopgp() function into the <BODY> tag only if this is the first time the page has appeared. This code snippet assumes that you have included the VID PageObject DTC in your ASP page.

 
<SCRIPT LANGUAGE=javascript>
<!--
function clearopgp() {
document.thisForm.OptionGroup1[0].checked=false;
}
//-->
</SCRIPT>

</HEAD>
<BODY
<% if thisPage.firstEntered=true then
Response.Write " onload=" & chr(34) & "clearopgp();" & chr(34)
end if
%>
>

Note that the final > in the code snippet is important because it completes the <BODY> tag.

Ken Cox
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date