The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> newbie on a mission, checking if checked boxes are checked....?
VDawgeh
post Oct 19 2006, 11:11 PM
Post #1





Group: Members
Posts: 1
Joined: 19-October 06
Member No.: 494



hiyas everybody biggrin.gif

i have a form i'm writing out, and i need the user to have checked between 1 and 3 boxes, but i dont know how to type it out >.<

i dont know if any of you guys have a server in your houses or something, but i need it to be in an asp file. this is waht i have at the moment, and it chechks for invalid characters, but it still needs to check if the boxes are checked too

CODE
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>Search Page</title>
<meta name="description" content="Assign2"/>

<body>
<%
name=request.form("myname")
invalid="1234567890!@#$%^&*()
inflag=false

if len(name)<> 0 then
    for i=1 to len(name)
        testchar=mid(name, i, 1)
        if instr(1, invalid, testchar) <> 0 then
            response.write(testchar & " is not a valid character </br>")
            inflag=true
        end if
    next
else
    response.write("you did not enter a value</br>")
end if
%>
<a href= "search.htm"> return to form</a>
</body>
</html>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Oct 19 2006, 11:46 PM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,021
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



QUOTE(VDawgeh @ Oct 19 2006, 09:11 PM) *
i have a form i'm writing out, and i need the user to have checked between 1 and 3 boxes, but i dont know how to type it out
Please see the FAQ entry How can I require that fields be filled in, or filled in correctly?


--------------------
Darin McGrew
WDG Member since 1998
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 31st October 2014 - 11:23 AM