Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > form no action

Reply
Thread Tools

form no action

 
 
Leif K-Brooks
Guest
Posts: n/a
 
      07-11-2004
Jeff Thies wrote:
> 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.
 
Reply With Quote
 
 
 
 
Jeff Thies
Guest
Posts: n/a
 
      07-12-2004
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
 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      07-12-2004
On Mon, 12 Jul 2004 05:27:20 GMT, Jeff Thies <(E-Mail Removed)>
declared in alt.html:

> 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

--
Mark Parnell
http://www.clarkecomputers.com.au
"Never drink rum&coke whilst reading usenet" - rf 2004
 
Reply With Quote
 
Art Sackett
Guest
Posts: n/a
 
      07-12-2004
Jeff Thies <(E-Mail Removed)> wrote:
> 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.

--
Art Sackett

 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      07-12-2004
Jeff Thies <(E-Mail Removed)> wrote:

> <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".)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      07-12-2004
in post: <news:(E-Mail Removed)>
Leif K-Brooks <(E-Mail Removed)> 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.

--
b r u c i e


 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      07-12-2004
brucie wrote:

> 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?

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      07-12-2004
in post: <news(E-Mail Removed) o.uk>
Toby Inkster <(E-Mail Removed)> 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.

--
b r u c i e


 
Reply With Quote
 
SpaceGirl
Guest
Posts: n/a
 
      07-12-2004
brucie wrote:

> in post: <news:(E-Mail Removed)>
> Leif K-Brooks <(E-Mail Removed)> 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.
>


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 #
 
Reply With Quote
 
Leif K-Brooks
Guest
Posts: n/a
 
      07-12-2004
brucie wrote:
> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Struts: 1 action, 1 Form, several views handled by 1 only action. Any idea for better design? John Java 0 06-26-2007 11:22 PM
Can we call an Action from another Action in struts??? vyshu Java 1 04-27-2007 09:19 AM
Struts mapping action to action??? runescience Java 3 02-07-2006 04:07 PM
Struts Forward to an Action from an to Action and URLs rjweytens Java 6 06-25-2004 01:49 PM
Struts Static Action Form vs Dyanamic Action Form Joe Bloggs Java 1 08-03-2003 02:30 AM



Advertisments