Bill,
You can do what you are looking for, but it's in a "round-about" fashion. If I am reading right you would like your web page/site to mimic a direct connection to the database to provide validation of fields as the user enters them without having to perform a post or get form request. 4D's built-in tags(4DVar, 4DScript, etc...) are not the ways to go especially if you are already using Active4d. Here is a suggestion....
If your javascript is embedded into your .a4d or .htm page, then use an loop within active4d coding to generate an array within the <script language="javascript"></script> tags. Active4d does this, 4D's built-in commands will not. Use this array to act as the form validator information or rules. When the user enters something or tabs to the next field, then call a generic javascript function that checks that field to its associated member in the array. This will check as they go to and from each field/textbox.
If your javascript is in an external .js file then let me know. I don't want to go typing away and find out that i'm totally off base. So let me know. Hope this helps,
Zach Dennis Market Technologies Inc.
From: William Swann <[EMAIL PROTECTED]>
(To Derrell & Jim) I wholly agree with the both of your suggestions of server side validation. There is plan for this as a final step. The idea was to not have the user enter 20 fields and find out there is an error. Suffice it to say, this is a secure network. I still need to understand how to process anything back and forth between A4D and javascript, if it is at all possible. I know that 4D's web server ignores 4DSCRIPT tags, etc within the <script> tag.
I guess another way to phrase my question would be: can I embed an A4D or 4D call into a javascript method? My naive understanding of A4D is that it is preprocessing the '.a4d' html files for sending to the client. Does A4D allow embedding calls inside of a javascript declaration? If not, then any suggestions?
Thanks again,
-Bill
>> More specifically, the 4D concept of object methods associated withinput field and variables. I would like to call a 4D routine to scan the entry of a text area and verify its validity without 'posting'. Is this possible?
Bill,
Unfortunately the browser only knows html, javascript, css and a few other things so if you want the power of 4d you will have to do that on the server.
If you want to do client side checking or validation of an input field without posting back to the server, you will need to use javascript. If you use server side validation you can either call 4d method(s) or more appropriately write an Active4d method(s) that does the validation. I would highly recommend doing the server-side validation with A4D methods.
You should validate all of the user input on the server side even if you use
javascript to validate on the client side. It's very easy to disable
javascript in most browsers. There are also many "clever" individuals who
know enough to save your page to their hard drive and modify it so that your
carefully crafted javascript does not do what you intended.
-- // Derrell Thomason <mailto:[EMAIL PROTECTED]> // Desktop Programming Coordinator // Pensacola Christian College <http://www.pcci.edu> _______________________________________________ Active4d-dev mailing list [EMAIL PROTECTED] http://aparajitaworld.com/mailman/listinfo/active4d-dev
-- ####################################################################### # William N. Swann # Consulting Principal # BioComp Consulting Group, Inc. # 5835 Avenida Encinas # Suite 121 # Carlsbad, CA 92008 (760) 438-1351 fax: (760) 438-2852 #######################################################################
_______________________________________________ Active4d-dev mailing list [EMAIL PROTECTED] http://aparajitaworld.com/mailman/listinfo/active4d-devn
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
