HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 24th, 2004, 04:58 PM
P2Designer P2Designer is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 P2Designer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post Printer Friendly pages.....

I have a client I am working with where I am taking a Word document, basically turning it into an HTML document, and making certain field in the form required such as check boxes and/or text boxes. #1, how do I go about making field required? I have a couple options in the form such as you can pick from CHOICE 1 OR CHOICE 2, both cannot be selected, however, one of them must be selected.
#2, when the user is done with all the required selections, we need it to produce a printer-friendly version of this form so all the salespeople nee to do is print it, and have them and the client sign it. We are trying to make it so this is as fool-proof as possible and all the necessary fields are filled in leaving nothing to question.

It would be kind of cool to also have the fiels turn red if the user does not fill everything in the first time, but this is just more for looks and ease of use, not necessarily needed.

Suggestions? Any help would be a tremendous help.

Thanks,
Chad

Reply With Quote
  #2  
Old March 29th, 2004, 12:18 AM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
For #1, you can use Javascript to validate the form. In your form, set the function that will validate the form. This example requires that a user enter a value in the "t1" textbox (you can do the same for checkboxes and radiobuttons with slightly different code):

<html>
<head>
<title>hello</title>

<script language="javascript">
function validateMe(form)
{
if ( form.t1.value="" )
{
alert("Please enter a value.");
return false;
}
return true;
}
</script>

</head>
<body>

<form name="form1" method="post" onSubmit="return validateMe(this);">
<input type="text" name="t1" value="">
<input type="submit" name="submit" value="Submit">
</form>

</body>
</html>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Printer Friendly pages.....


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT