Re: [PHP] Javascript and $_POST

2007-02-08 Thread Dan Shirah
Okay, I edited my page per some suggestions here. Below is what I now have: script language=JavaScript function checkForm() { // ** START ** if (inputForm.cc_phone_number.value == ) { alert( Please enter a phone number. ); inputForm.cc_phone_number.focus(); return; } **Lots of

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Németh Zoltán
On cs, 2007-02-08 at 08:14 -0500, Dan Shirah wrote: Okay, I edited my page per some suggestions here. Below is what I now have: script language=JavaScript function checkForm() { // ** START ** if (inputForm.cc_phone_number.value == ) { alert( Please enter a phone number. );

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Németh Zoltán
On cs, 2007-02-08 at 08:41 -0500, Dan Shirah wrote: I should not need an actual Button if my link to checkForm() ends with document.inputForm.submit(); which tells the form to submit, right? well, you should be right... but I remember a year ago or so I had a similar problem and the image input

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Németh Zoltán
On cs, 2007-02-08 at 08:56 -0500, Dan Shirah wrote: Okay, I'll try your spacer solution. Where do you think I should add it? I put it right before the /form tag, but I think you could put it anywhere between the form and the /form greets Zoltán Németh On 2/8/07, Németh Zoltán [EMAIL

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Dan Shirah
Nope, same result unfortunately. On 2/8/07, Németh Zoltán [EMAIL PROTECTED] wrote: On cs, 2007-02-08 at 08:56 -0500, Dan Shirah wrote: Okay, I'll try your spacer solution. Where do you think I should add it? I put it right before the /form tag, but I think you could put it anywhere

Re: [PHP] Javascript and $_POST

2007-02-08 Thread T . Lensselink
There is nothing wrong with the way you want to submit this form. Although it's JS :) The sample code you posted was broken in some ways... missing document. in JS en missing input field to check. This sample works fine ... test.html script language=JavaScript function checkForm() { if

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Németh Zoltán
On cs, 2007-02-08 at 09:09 -0500, Dan Shirah wrote: Nope, same result unfortunately. well, sorry, then my memories were incorrect maybe I should run a memtest86 on myself ;) greets Zoltán Németh On 2/8/07, Németh Zoltán [EMAIL PROTECTED] wrote: On cs, 2007-02-08 at 08:56

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Jon Anderson
I'm no JavaScript expert, but I could maybe suggest an alternate method: use document.getElementById() or document.getElementsByName() AFAIK, the direct document.xyz doesn't work exactly the same way accross browsers (if at all). e.g. (WARNING! TOTALLY UNTESTED CODE!) function

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Dan Shirah
Jon, Tried your method and still got: *Error: Object doesn't support this property or method. Code: 0* On 2/8/07, Jon Anderson [EMAIL PROTECTED] wrote: I'm no JavaScript expert, but I could maybe suggest an alternate method: use document.getElementById() or document.getElementsByName()

Re: [PHP] Javascript and $_POST

2007-02-08 Thread T . Lensselink
Don't see how this can pass the check without document. if (inputForm.cc_phone_number.value == ) { alert( Please enter a phone number. ); inputForm.cc_phone_number.focus(); return; } Comming to this check already gives an error. Maybe ask on some Javascript list. P.s. reply to the

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Jon Anderson
Dan Shirah wrote: Jon, Tried your method and still got: *Error: Object doesn't support this property or method. Code: 0* *I don't know what browser/platform you're using, but the following works for me on IE7/Windows, FF2/Linux, Opera9/Linux. jon html head script language=JavaScript

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Jon Anderson
Jon Anderson wrote: ... item.focus(); } ** alert(onError); **return(false);* *} ... Sorry about the *s everywhere (there aren't supposed to be any). I pasted the code in, and Thunderbird thought it was supposed to be bold for some reason, then converted the bold text to text with *s

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Dan Shirah
You guys are going to kill me! I found my problemand it's one of those What the hell were you thinking issues. Within my form was a button but I stupidly made it a submit when I created it and therefore the javascript check for submit was finding my button first and dumping the error. So,

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Robert Cummings
On Thu, 2007-02-08 at 10:21 -0500, Dan Shirah wrote: You guys are going to kill me! I found my problemand it's one of those What the hell were you thinking issues. Nah, probably lots of us have been bitten by that. I know I have been in the past, so now I always name my submit buttons

[PHP] Javascript and $_POST

2007-02-07 Thread Dan Shirah
I have a form that uses Javascript to validate form field entries, and if they are incorrect it returns an error to the user. After the Javascript processing is complete, it submits the form to my save page. However it seems that once the processing is complete and it passes to the save page,

RE: [PHP] Javascript and $_POST

2007-02-07 Thread Brad Fuller
-Original Message- From: Dan Shirah [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 4:35 PM To: php-general Subject: [PHP] Javascript and $_POST I have a form that uses Javascript to validate form field entries, and if they are incorrect it returns an error

Re: [PHP] Javascript and $_POST

2007-02-07 Thread Jon Anderson
Dan Shirah wrote: And this is my Save option at the bottom of my page form name=Submit action=save.php method=post enctype=multipart/form-data table align=center border=0 cellpadding=0 cellspacing=0 width=680 tr td width=64 align=lefta href=javascript:checkForm() title=SaveSave/a/td /tr /table

Re: [PHP] Javascript and $_POST

2007-02-07 Thread Paul Novitski
At 2/7/2007 01:34 PM, Dan Shirah wrote: I have a form that uses Javascript to validate form field entries, and if they are incorrect it returns an error to the user. After the Javascript processing is complete, it submits the form to my save page. However it seems that once the processing is