action in forms

D

dorayme

Now and then I have used

<div align="center">
<FORM>
<INPUT TYPE="button" VALUE=" back " onClick="history.go(-1)">
</FORM>
</div>

to allow people to go back to the page they were at before.

But W3C says "required attribute "ACTION" not specified"

When I put <FORM action="">, it solves *this* problem but I can't believe it
is the right way to go... I am asking what is the *closest* correct code to
mine to do this if this if mine is not really kosher...

dorayme

[To email me directly so I get it, please use "12345" without the quotes
somewhere in the subject line]
 
O

Oli Filth

dorayme said:
Now and then I have used

<div align="center">
<FORM>
<INPUT TYPE="button" VALUE=" back " onClick="history.go(-1)">
</FORM>
</div>

to allow people to go back to the page they were at before.

But W3C says "required attribute "ACTION" not specified"

When I put <FORM action="">, it solves *this* problem but I can't believe it
is the right way to go... I am asking what is the *closest* correct code to
mine to do this if this if mine is not really kosher...

dorayme

[To email me directly so I get it, please use "12345" without the quotes
somewhere in the subject line]

You're using a form as a means of navigation, which isn't what it's
designed for. What's more, users have a perfectly good back button on
their browser already; what's the point in putting one on your page?

This also relies on the user having Javascript enabled; if they don't
then your button will do nothing.

If you do want to get your code to validate, however, get rid of the
<FORM></FORM> tags, and make sure the button is inside a DIV.

Oli
 
O

Oli Filth

dorayme said:
Now and then I have used

<div align="center">
<FORM>
<INPUT TYPE="button" VALUE=" back " onClick="history.go(-1)">
</FORM>
</div>

to allow people to go back to the page they were at before.

But W3C says "required attribute "ACTION" not specified"

When I put <FORM action="">, it solves *this* problem but I can't believe it
is the right way to go... I am asking what is the *closest* correct code to
mine to do this if this if mine is not really kosher...

dorayme

[To email me directly so I get it, please use "12345" without the quotes
somewhere in the subject line]

One more thing. The align attribute for DIVs, etc. is now deprecated.
Use CSS instead.

Oli
 
D

dorayme

From: Oli Filth said:
Organization: Virgin Net Usenet Service
Newsgroups: alt.html
Date: Fri, 31 Dec 2004 02:01:50 GMT
Subject: Re: action in forms
Now and then I have used

<div align="center">
<FORM>
<INPUT TYPE="button" VALUE=" back " onClick="history.go(-1)">
</FORM>
</div>

to allow people to go back to the page they were at before.

But W3C says "required attribute "ACTION" not specified"

When I put <FORM action="">, it solves *this* problem but I can't believe it
is the right way to go... I am asking what is the *closest* correct code to
mine to do this if this if mine is not really kosher...

dorayme

[To email me directly so I get it, please use "12345" without the quotes
somewhere in the subject line]

You're using a form as a means of navigation, which isn't what it's
designed for. What's more, users have a perfectly good back button on
their browser already; what's the point in putting one on your page?

This also relies on the user having Javascript enabled; if they don't
then your button will do nothing.

If you do want to get your code to validate, however, get rid of the
<FORM></FORM> tags, and make sure the button is inside a DIV.

Oli


and in later post:
One more thing. The align attribute for DIVs, etc. is now deprecated.
Use CSS instead.


Thank you. You remind me to do things I know better and tell me something I
did not realise, about the form tag. I must have grabbed this bit of code
somewhere and stuck it in, it has been useful in that one does not need to
move the mouse to the browser back-button (or know and use key commands). In
context, it is handy but it is not very important being there or not. I
might leave it out? I put it in for emphasis so that folk are less tempted
to go off on some other train. And for reason stated below. But folk are
more savvy these days and I should trust them.

There is a little issue with the browser back-button that puts me off it
somewhat on dial-up, I get so many pages on so many sites reloading slowly
instead of instantly appearing from the cache on the HD on so many sites
these days, (eg. on eBay and Internet Movie Database). It does not happen on
sites I have made (that are fetched online from a remote server) but my
point is there may be other folk who are wary on dial-up of pressing the
browser back-button and having to wait again...

dorayme

[To email me directly so I get it, please use "12345" without the quotes,
somewhere in the subject line]
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top