Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-08 Thread y2rob
yeah YAY TO FIREBUG!!!? I hear though that FF 3 is way better; it's what i hear :) so don't quote me on that. ~rob -Original Message- From: David Mintz <[EMAIL PROTECTED]> To: NYPHP Talk Sent: Thu, 8 May 2008 12:29 pm Subject: Re: [nyphp-talk] Trapping JS er

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-08 Thread David Mintz
Amen to that -- Firebug is an immense help. Indispensable, even, if you are doing Ajax and need to inspect the stuff coming back at you. Too bad FF 2.x is such a prolifigate hog and waster of memory -- it's really killing me here on Fedora 7. On Tue, May 6, 2008 at 6:49 PM, Tim Lieberman <[EMAIL P

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-07 Thread tedd
At 8:25 AM -0700 5/7/08, Kristina Anderson wrote: PS special thanks to Tedd for testing the script for me. Also, I've forwarded this thread to the person who designed the HTML forms for this project. Is there any reason to prefer label tags over using id, or is either one fine going forward?

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-07 Thread Kristina Anderson
PS special thanks to Tedd for testing the script for me. Also, I've forwarded this thread to the person who designed the HTML forms for this project. Is there any reason to prefer label tags over using id, or is either one fine going forward? --Kristina > Hi everyone -- thanks again for help

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-07 Thread Kristina Anderson
Hi everyone -- thanks again for help and just wanted to let you know what the issue ended up being. If a label tag with for= is not used, then name= & id= must both be used inside the tag, as Javascript uses id & PHP uses name. -- Kristina > ed, > > it calls the subfunctions like so: >

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-07 Thread Kristina Anderson
ed, it calls the subfunctions like so: reason += validateUsername(theForm.user_name); reason += validatePassword(theForm.pwd); reason += validateEmail(theForm.email1); reason += validatePhone(theForm.phone1); reason += validateEmpty(theForm.first_name); which appears to be OK > Well th

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-07 Thread Webmaster
Well that's different... if the Javascript is 'looping' over the form array as so: function check(){ fld = document.getElementById('test').value.length ; alert(fld); } function loopForms(){ var frms = document.forms ; for(a=0;a

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-07 Thread tedd
At 6:52 PM -0700 5/6/08, Kristina Anderson wrote: Rolan, I found this one that looked very easy to expand at http://www.webcheatsheet.com/javascript/form_validation.php However it is not picking up the blank fields... blank fields ? I must not be understanding this -- doesn't validateEmpty

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-07 Thread Kristina Anderson
it's implicitly referenced, i.e. the name of the element is being passed in as an enumerated value assigned to the type of validation subroutine I want to call for that element. But by "by id" i guess that there needs to be an id="sameasname" in each form element...?? That could be the issue?

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-07 Thread Webmaster
That's correct Javascript, assuming that fld = document.getElementById('the element you are referencing') Kristina Anderson wrote: if (fld.value.length == 0) { is that even right? I thought it used to be fld.length or fld.text.length...?? Kristina Rolan, I found this one that loo

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-06 Thread Kristina Anderson
if (fld.value.length == 0) { is that even right? I thought it used to be fld.length or fld.text.length...?? Kristina > Rolan, > > I found this one that looked very easy to expand at > > http://www.webcheatsheet.com/javascript/form_validation.php > > However it is not picking up the blan

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-06 Thread Kristina Anderson
Rolan, I found this one that looked very easy to expand at http://www.webcheatsheet.com/javascript/form_validation.php However it is not picking up the blank fields... I can try yours if you point me to it! I need something that is extensible to handle the various types of input like emails,

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-06 Thread Rolan Yang
which one are you using? FormChek.js is easy and hasn't let me down yet. ~Rolan ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participatio

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-06 Thread Tim Lieberman
Also: Firebug is your friend. Just set a breakpoint on the first line of your function, and step through. -Tim On May 6, 2008, at 4:25 PM, Kristina Anderson wrote: thanks!! will do. On Tue, May 6, 2008 at 5:59 PM, Kristina Anderson <[EMAIL PROTECTED]> wrote: Hi everyone -- I'm try

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-06 Thread Kristina Anderson
thanks!! will do. > On Tue, May 6, 2008 at 5:59 PM, Kristina Anderson > <[EMAIL PROTECTED]> wrote: > > > > Hi everyone -- > > > > I'm trying to build out a validation routine for my input forms and > > found something that I like/find easy to extend. I added it as an > > external script to

Re: [nyphp-talk] Trapping JS errors in function called onSubmit

2008-05-06 Thread John Campbell
On Tue, May 6, 2008 at 5:59 PM, Kristina Anderson <[EMAIL PROTECTED]> wrote: > > Hi everyone -- > > I'm trying to build out a validation routine for my input forms and > found something that I like/find easy to extend. I added it as an > external script to my test page. I tested to make sure