Thanks that should get me where I need to be. A good base to work from
--
Dan Stein
FileMaker 7 Certified Developer
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
Land: 215-799-0192
Cell: 610-256-2843
Fax 413-410-9682
FMP, WiTango, EDI,SQL 2000, MySQL, CWP
[EMAIL PROTECTED]
www.dss-db.com
"There is a larger frame to the painting than the one that bounds our
life's events."
> From: Ben Johansen <[EMAIL PROTECTED]>
> Reply-To: "[email protected]" <[email protected]>
> Date: Fri, 30 Mar 2007 16:09:16 -0700
> To: "[email protected]" <[email protected]>
> Subject: Re: Witango-Talk: JS Form Validation
>
> Take II
>
> <pre>
>
> <FORM NAME="theForm" onSubmit="return validateForm(this);"
> METHOD=POST ACTION="<@CGI><@APPFILE>">
> Field1 = <INPUT TYPE=TEXT SIZE=25 NAME="field1"><br>
> <span id="field2Label" style="color: Green;">Field2</span> = (max 5
> chars) <INPUT TYPE=TEXT SIZE=25 NAME="field2">
> <P>
> <INPUT TYPE=SUBMIT NAME="Submit" VALUE="Submit">
> <INPUT TYPE=RESET VALUE=Reset>
> </FORM>
>
>
> <SCRIPT language="JavaScript">
> <!-- Begin JavaScript
>
> function validateForm(formObj)
> {
> if (formObj.field1.value == "")
> {
> alert("field1 is blank");
> formObj.field1.focus();
> return false;
> }
> if (formObj.field2.value.length > 5)
> {
> //alert("field2 is longer than 5 chars");
> fieldLabel = document.getElementById("field2Label");
> fieldLabel.style.color = "Red";
> formObj.field2.focus();
> return false;
> }
>
> }
>
> // -- End JavaScript -->
> </SCRIPT>
>
>
>
> </pre>
> On Mar 30, 2007, at 3:50 PM, Dan Stein wrote:
>
> I guess if no one has something they have found to work well I will
> do that.
> I have done some searching so far just found stuff that puts up an alert
> where I really would prefer the color coding of the missing fields.
> --
> Dan Stein
> FileMaker 7 Certified Developer
> Digital Software Solutions
> 799 Evergreen Circle
> Telford PA 18969
> Land: 215-799-0192
> Cell: 610-256-2843
> Fax 413-410-9682
> FMP, WiTango, EDI,SQL 2000, MySQL, CWP
> [EMAIL PROTECTED]
> www.dss-db.com
>
> 'I wonder why we say that people are of different "races". It seems
> to me,
> we're all running at the same speed and heading towards the same
> destination. The only "winners" are the ones who've made the world a
> better
> place for having been here.'
> From for Better or Worse 2/28/2006
>
>
>
>
>> From: Ben Johansen <[EMAIL PROTECTED]>
>> Reply-To: "[email protected]" <[email protected]>
>> Date: Fri, 30 Mar 2007 15:43:26 -0700
>> To: "[email protected]" <[email protected]>
>> Subject: Re: Witango-Talk: JS Form Validation
>>
>> Honestly Dan you need to crack open Google on JS some
>>
>> Here is sample
>> <pre>
>> <FORM NAME="theForm" onSubmit="return validateForm(this);"
>> METHOD=POST ACTION="<@CGI><@APPFILE>">
>> Field1 = <INPUT TYPE=TEXT SIZE=25 NAME="field1"><br>
>> Field2 = (max 5 chars) <INPUT TYPE=TEXT SIZE=25 NAME="field2">
>> <P>
>> <INPUT TYPE=SUBMIT NAME="Submit" VALUE="Submit">
>> <INPUT TYPE=RESET VALUE=Reset>
>> </FORM>
>>
>>
>> <SCRIPT language="JavaScript">
>> <!-- Begin JavaScript
>>
>> function validateForm(formObj)
>> {
>> if (formObj.field1.value == "")
>> {
>> alert("field1 is blank");
>> formObj.field1.focus();
>> return false;
>> }
>> if (formObj.field2.value.length > 5)
>> {
>> alert("field2 is longer than 5 chars");
>> formObj.field2.focus();
>> return false;
>> }
>>
>> }
>>
>> // -- End JavaScript -->
>> </SCRIPT>
>>
>> </pre>
>>
>> Ben
>>
>> On Mar 30, 2007, at 2:42 PM, Dan Stein wrote:
>>
>> Ben that sounds good but don't I still need some sample code to use?
>> --
>> Dan Stein
>> FileMaker 7 Certified Developer
>> Digital Software Solutions
>> 799 Evergreen Circle
>> Telford PA 18969
>> Land: 215-799-0192
>> Cell: 610-256-2843
>> Fax 215-799-0192 ( Call 1st)
>> FMP, WiTango, EDI,SQL 2000, MySQL, CWP
>> [EMAIL PROTECTED]
>> www.dss-db.com
>>
>> Men do not care how nobly they live, but only how long they live,
>> although
>> it is within the reach of every man to live nobly, but within no
>> man's power
>> to live long. Brian Haig Private Sector
>>
>>
>>
>>
>>> From: Ben Johansen <[EMAIL PROTECTED]>
>>> Reply-To: "[email protected]" <[email protected]>
>>> Date: Fri, 30 Mar 2007 14:31:42 -0700
>>> To: "[email protected]" <[email protected]>
>>> Subject: Re: Witango-Talk: JS Form Validation
>>>
>>> What i do to alleviate that is use the JS core checks on client side
>>> and server side JS, that way I get most bang for buck on JS code and
>>> i dont have to have rules in both JS and Witango (or PHP ;-)
>>>
>>> Ben
>>>
>>> On Mar 30, 2007, at 2:24 PM, Alan Wolfe wrote:
>>>
>>> Client side validation is good but not fool proof. I worked on a
>>> witango project for a couple of years where there was a time when we
>>> relied exclusively on client side checking and it worked 99% of the
>>> time, but that last 1% of users hitting errors started to add up.
>>>
>>> IMO server side checks are a must have and client side checks are a
>>> nicety.
>>>
>>> On 3/30/07, Dan Stein <[EMAIL PROTECTED]> wrote:
>>>> I need to find a good JS form validation that I can use to validate
>>>> a form
>>>> before it is entered so I don't have to trap for things with
>>>> Witango. This
>>>> site uses SHTML for most of the functions.
>>>>
>>>> I prefer a validation that someone know will work even though the
>>>> action is
>>>> to a taf file and hopefully one that just brings back the form with
>>>> the
>>>> missing fields in red.
>>>> --
>>>> Dan Stein
>>>> FileMaker 7 Certified Developer
>>>> Digital Software Solutions
>>>> 799 Evergreen Circle
>>>> Telford PA 18969
>>>> Land: 215-799-0192
>>>> Cell: 610-256-2843
>>>> Fax 215-799-0192 ( Call 1st)
>>>> FMP, WiTango, EDI,SQL 2000, MySQL, CWP
>>>> [EMAIL PROTECTED]
>>>> www.dss-db.com
>>>>
>>>> "The love of one's country is a splendid thing. But why should love
>>>> stop at
>>>> the border?"
>>>>
>>>> Pablo Casals
>>>>
>>>>
>>>> ____________________________________________________________________
>>>> _
>>>> _
>>>> __
>>>> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>>>>
>>>>
>>> _____________________________________________________________________
>>> _
>>> __
>>> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>>>
>>> _____________________________________________________________________
>>> _
>>> __
>>> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>>>
>>
>> ______________________________________________________________________
>> __
>> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>>
>> ______________________________________________________________________
>> __
>> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>>
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf