Wrox Programmer Forums
|
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 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
 
Old January 25th, 2005, 05:36 AM
Authorized User
 
Join Date: Dec 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default explicit way to identify a radiobutton?

as you can see below, i did quite a hack to recognize a radiobutton, is there a explicit way to identify a radiobutton?

Code:
function add_validation(itemname,descriptor,errstr){
    //radiobutton entry point
    if (typeof(this.formobj[itemname].type)=="undefined"){
        var itemobj = this.formobj[itemname][0];
    }
    else {
        var itemobj = this.formobj[itemname];
    }
}
 
Old January 25th, 2005, 08:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Is this javascript code?
 
Old January 26th, 2005, 05:30 AM
Authorized User
 
Join Date: Dec 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thought I'm in a javascript thread...

The big picture: I'm developing a form validation component with javascript. Within the .asp page which contains the html for the form as well, I create a validator object and add explicitely validations for a specific field. This specification happens through the input item's name. With this approach (maybe betters already though?) I will have to search in the .js file with the item's name to get the input object itself.

Now my doubt: by checking against the type == "undefined" (see code above) I do not feel comfortable to identify a radiobutton group...






Similar Threads
Thread Thread Starter Forum Replies Last Post
Rollback in trigger??? (explicit/autocommit) edvin SQL Server 2005 2 April 20th, 2008 05:28 PM
XML EXPLICIT with text column stevemeyns SQL Server 2005 1 February 7th, 2007 01:09 PM
FOR XML Explicit and ASP tonyellard SQL Server ASP 1 April 8th, 2005 10:41 AM
For XML Explicit bmains SQL Server 2000 5 March 8th, 2004 09:18 AM
Option Explicit and Item lcsgeek Classic ASP Basics 1 October 6th, 2003 01:54 PM





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