form no action

L

Leif K-Brooks

Jeff said:
I have a form tag with no properties:
When I submit that form (it's a server page) it submits it to itself.

Is this the default behaviour (submitting to the same url)

It depends on what your browser chooses to do. Most browsers seem to
submit to the current page.
and is that reliable?

No. The standard (http://www.w3.org/TR/html4/interact/forms.html#h-17.3)
doesn't say what should happen, and a perfectly compliant browser would
probably raise an error if you do that. A browser could just as easily
explode, display a photo of a cute little kitty, or submit the form to a
page showing hardcore porno.
 
J

Jeff Thies

I have a form tag with no properties:

<form> look ma, no action

When I submit that form (it's a server page) it submits it to itself.

I wasn't really expecting that as I had just forgotten to add the action.

Is this the default behaviour (submitting to the same url) and is that
reliable?

Jeff
 
M

Mark Parnell

I have a form tag with no properties:

<form> look ma, no action

That's malformed. Didn't the validator tell you that the action
attribute is required?
Is this the default behaviour (submitting to the same url) and is that
reliable?

Depends on the browser, and no.

"action = uri [CT]
This attribute specifies a form processing agent. User agent
behavior for a value other than an HTTP URI is undefined."
http://www.w3.org/TR/html4/interact/forms.html#h-17.3
 
A

Art Sackett

Jeff Thies said:
I have a form tag with no properties:

<form> look ma, no action

When I submit that form (it's a server page) it submits it to itself.
Is this the default behaviour (submitting to the same url) and is that
reliable?

It would be a client-defined behavior, as the various recommendations
don't specify a default. I recommend against relying upon any default
behavior that isn't in the recommendations, no matter how reliably it
might seem to work.
 
J

Jukka K. Korpela

Jeff Thies said:
<form> look ma, no action

When I submit that form (it's a server page) it submits it to
itself.

As others have responded, the construct is erroneous by current HTML
specifications, and as far as specs go, anything may happen, since the
specs don't impose any requirements on processing erroneous documents
(and for this kind of error, no suggestion either).

On the other hand, this is a change in HTML 4.0, since by HTML 3.2, the
action attribute was optional, and HTML 2.0 (a great improvement over its
successors in clarity) said the same and additionally: "The action URI of
a form defaults to the base URI of the document." Not surprisingly, then,
browsers tend to behave that way if the action attribute is omitted.

(The base URI, in turn, defaults - in the absence of a <base href="...">
tag - to the URI of the document itself. And "URI", in practical terms,
is the geek way of spelling "URL".)
 
B

brucie

in post: <
Leif K-Brooks said:
[submit with my form action]
A browser could just as easily explode, display a photo of a cute
little kitty, or submit the form to a page showing hardcore porno.

i can confirm this with opera 7.52 (win) the cute little kitty
bestiality site i glimpsed shortly before my browser exploded was very
shocking.
 
T

Toby Inkster

brucie said:
i can confirm this with opera 7.52 (win) the cute little kitty
bestiality site i glimpsed shortly before my browser exploded was very
shocking.

I didn't think anything shocked you, brucie?
 
B

brucie

in post: <
Toby Inkster said:
I didn't think anything shocked you, brucie?

i'm always shocked to discover there are people just as sick 'n twisted
as i am. they scare me.
 
S

SpaceGirl

brucie said:
in post: <
[submit with my form action]
A browser could just as easily explode, display a photo of a cute
little kitty, or submit the form to a page showing hardcore porno.


i can confirm this with opera 7.52 (win) the cute little kitty
bestiality site i glimpsed shortly before my browser exploded was very
shocking.

My... Hello Kitty is all grown up!

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
L

Leif K-Brooks

brucie said:
i can confirm this with opera 7.52 (win) the cute little kitty
bestiality site i glimpsed shortly before my browser exploded was very
shocking.

Never drink cum and roke while reading Usenet.
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top