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 "
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.
S
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 "
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
function checkInputValue(item,onError) {
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 th
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()
AF
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 checkInputValu
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
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
function checkForm() {
if (document.inputForm.cc_phone_num
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 tag, but I think you could put it
anywhere between
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 tag, but I think you could put it
anywhere between the and the
greets
Zoltán Németh
>
> On 2/8/07, Németh Zoltán <[EMAIL PROTECTED]> wr
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
inpu
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:
>
>
>
> function checkForm() {
>
> // ** START **
> if (inputForm.cc_phone_number.value == "") {
> alert( "Please enter a phone number." );
> inputForm.c
Okay, I edited my page per some suggestions here. Below is what I now have:
function checkForm() {
// ** START **
if (inputForm.cc_phone_number.value == "") {
alert( "Please enter a phone number." );
inputForm.cc_phone_number.focus();
return;
}
**Lots of other checks here, jus
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 com
Dan Shirah wrote:
And this is my Save option at the bottom of my page
Save
ErWhy aren't there any input elements within the tag? Maybe
you just condensed-out the inputs, but if your inputs aren't within the
form, they won't be submitted.
E.g. if you have:
...
If you subm
> -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 incorrec
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, non
18 matches
Mail list logo