what is <form> useful for?

A

^AndreA^

Don't use a submit button, use an ordinary one. Do your validation, and
if all is OK do the submit from within js.

yeah, but we have just said that js could be disabled...
 
S

Sherman Pendley

^AndreA^ said:
and then I tie a js event to the submit button.

So, when the user presses the button the js function starts, but also
the data is sent to the server... because pressing the button you
active two things simultaneously.

I'm sure there is a workaround...

Basically the question is:
how can I tie a js function to the form without breaking it?
how can I prevent the form to send data if js "says" there is
something wrong?

Tie an onsubmit handler to the form, instead of an onclick on a
button. If JS is allowed and the form handler returns false, the form
isn't sent. If the handler returns true, the form data is sent to the
action URL. If JS is disabled, the form behaves just like any other
non-JS form, and sends its data to the action URL.

sherm--
 
R

Raymond SCHMIT

Poor choice of design implementation.

Ok, so ....you can you check if the fields are filled up correctly -
(before - treating the form in php) without using javascript ?
 
A

^AndreA^

Ok, so ....you can you check if the fields are filled up correctly -
(before - treating the form in php) without using javascript ?

Javascript OFF:
you send the data directly to the server because the js event can't
start, the browser doesn't even notice the event...

Javascript ON:
you check the fields with js and then, if everything is ok, you send
the data to the server...

Cheers Sherman!!!
Andrea
 
D

dorayme

Travis Newbury said:
There you go again dorayme, telling someone what I was thinking. You
haven't a clue what I am thinking. I simply stated that when a
visitor comes to a page that is not configured for their browser, they
have to make a choice. Change the browser, or go away.

Given the constancy of your postings on this sort of thing, you are
meaning to make a more general point than simply telling us what is
blindingly obvious.

Why would you simply be telling everyone the bleeding obvious? O wait,
of course, I nearly forgot, you are demonstrating your continuing role
as Chief Guardian of the motherhood statement.
 
D

dorayme

Travis Newbury said:
One man's "competent" is another man's fool. Someone you may see as an
expert, I might see as an amateur.

Yes, of course, there is no fact of the matter, everything is relative
to everything else. That you see something one way does not in any way
mean you are wrong or superficial or uninformed or biased. Any attempt
to show otherwise is easily parried by you with more of the same
garbage. W hat is like to live in such an intellectual closed loop that
is in no way able to be influenced by anything outside? Is it an
interesting sort of vacuum?
 
T

Travis Newbury

Why would you simply be telling everyone the bleeding obvious? O wait,
of course, I nearly forgot, you are demonstrating your continuing role
as Chief Guardian of the motherhood statement.

Apparently it is not so obvious to everyone or I would not find the
need to state it.
 
D

dorayme

Travis Newbury said:
Apparently it is not so obvious to everyone or I would not find the
need to state it.

Care to be more specific? Do you think Jonathan Little is such an idiot
that he cannot see the bleeding obvious? He may be a guy who likes to be
'on message' at all times and not one to dissect your insinuations in
detail, but you must be living in a bubble if you don't know that he
knows that a surfer can either suck it or leave it with a webpage.

Can't you see that he pays you a compliment and is arguing against what
he thinks are deeper assumptions or positions?

He does not know what I know about you. You have no position, that what
we see is what we get, impossible-to-disagree-with motherhood
statements. He sees only your statements here. But I have men all over
the show reporting back to me and they tell me that you walk the streets
with sandwich boards, on the front of which is stuff like, "the world
will end tomorrow" and on the back of which there is stuff like "the
world will not end tomorrow".

You have been seen at the races betting on horses and quickly covering
your bets on the same horses. And grimly being happy to pay for the
slight loss in bookie rewards for the pleasure.

You have up 4 shrinks chasing after you at any one times begging you to
return to their couches...

You can't fool me Travis. But good luck with the others.
 
T

Travis Newbury

Do you think Jonathan Little is such an idiot
that he cannot see the bleeding obvious?

Nope not at all. But I do think that some of readers of the thread
that don't post are. They need to hear more than the party line on
web development paradigms.
Can't you see that he pays you a compliment and is arguing against what
he thinks are deeper assumptions or positions?

Yes, and so?
He does not know what I know about you.

So, we are the resident Newbury expert are we?
You have no position, that what
we see is what we get, impossible-to-disagree-with motherhood
statements.

For a Newbury expert you seem to lack understanding about me and what
I think. Perhaps you are not the expert you say you are...
 
T

Travis Newbury

It ain't obvious to me.  What's the "motherhood statement"; -everyone who
ain't cool to the implicit observer is a mutha or what?

What dorayme is trying to say is that I make a statement like "Use the
technology that brings you the most business" She thinks that a a no-
brainer and there is no need to even mention it in the group. The
"Motherhood statement" there is no real argument to the statement.
You can't come back with "No you should do things that make you less
money"

If I did not state the "obvious" then silent readers would only be
give the party line "flash is evil", "don't use javascript","fixed
width sucks" bla bla bla... Newbees and the silent type need to
understand that there is another line of thought when comes to web
development.
 
J

John Hosking

Travis said:
....

If I did not state the "obvious" then silent readers would only be
give the party line "flash is evil", "don't use javascript","fixed
width sucks" bla bla bla... Newbees and the silent type need to
understand that there is another line of thought when comes to web
development.

So is this my cue to complain about your broken sig separator and your
intentionally obnoxious sig? You know, lest the "silent readers" fail to
understand that there is another line of thought when it comes to
netiquette?
 
D

dorayme

Travis Newbury said:
If I did not state the "obvious" then silent readers would only be
give the party line "flash is evil", "don't use javascript","fixed
width sucks" bla bla bla... Newbees and the silent type need to
understand that there is another line of thought when comes to web
development.

The average silent type is not so stupid as to suppose everyone thinks
that flash is evil, they would not get just that message from this
group. If a particular silent type was so stupid as to get that idea,
along with the idea that all tables are bad, then you should show a bit
of respect for the general intelligence and wait for such incredible
misunderstanding to surface.

Where the hell do you really think you are, Travis? Kindergarten? I
teach babies CSS/HTML (I am fully qualified at this level but no higher)
and don't talk to them like this.

And don't you be telling me about the silent type. Deep inside of me is
a very strong silent type bursting to get out. I am perfectly well
acquainted with it. It wants to get its hands around Boji's schmuck
neck. I repress and condemn it to silence.
 
T

Travis Newbury

On the contrary, I believe that the killfiler is much more adversely affected
by his action than is the killfilee.  Frustrated, self-limiting people are
generally their own worst enemies.

I think we are saying the same thing.
 
T

Travis Newbury

So is this my cue to complain about your broken sig separator and your
intentionally obnoxious sig? You know, lest the "silent readers" fail to
understand that there is another line of thought when it comes to
netiquette?

I believe you are right...
 
T

Travis Newbury

How funny coming from a 'guy' who has a driving need to boast about his huge
ego.

you misspelled penis.. But huge ego still works for me.

And on a side note.... Who would have guessed, there is actually a
website to help someone name their penis (but when your packing
something like Beefy McManstick, the name just comes naturally)
 
T

Tim Streater

I've just been following this rilly *rilly* useful thread.

So tell me: just how many angels *were* there on that pinhead?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,099
Messages
2,570,626
Members
47,237
Latest member
David123

Latest Threads

Top