submit form to same page

S

Shank

I'm having a problem with submitting a form to the same page. 99% of all
users go through without issue. Yet there's a handful that say their data is
not being submitted. They redirect to an error page.

Assume I'm submitting to the same page: review.asp
Is there any difference between: action="review.asp" and action="" ...?

<form action="review.asp" method="post" name="frmReview" id="frmReview">

thanks
 
D

David Dorward

Shank said:
Is there any difference between: action="review.asp" and action="" ...?

The former submits to the relative URL "review.asp", the latter isn't a URL
and the behaviour is undefined, some browsers will treat it as if it was
the URL of the current page, others will treat it as "./", its best
avoided.
 
M

Michael Winter

Shank said:
Is there any difference between: action="review.asp" and action=""
...?

The former submits to the relative URL "review.asp", the latter isn't
a URL and the behaviour is undefined [...]

Not so.

Within a representation with a well defined base URI of

http://a/b/c/d;p?q

a relative reference is transformed to its target URI as
follows.

...

"" = "http://a/b/c/d;p?q"

-- 5.4 and 5.4.1, Reference Resolution Examples, RFC 3986

However, I do agree that it's best avoided in production as not all user
agents agree. For example, and as David said, IE will treat empty URIs
in links as "./", though it will act properly for FORM action attributes
with empty values.

Mike
 

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,768
Messages
2,569,575
Members
45,052
Latest member
KetoBeez

Latest Threads

Top