Click to See Complete Forum and Search --> : using a button without a form


k0r54
10-13-2005, 01:14 PM
Hi,

If i wanted a button on my page like the one used in a form. how could i do it.

I have a submit button on my form already and i need another button in there, so i cant just put a form around it.

I just want to click it and for it to go to another page, i dont need it to pass any variables.

Thanks
Adam

csymjs
10-13-2005, 05:15 PM
Try something like this:

<input type="button" name="" value="Click Here" onclick="parent.location.href='http://www.lastminute.com';" />

felgall
10-13-2005, 05:26 PM
To be valid all input tags must be inside of a form.

If you want a button outside of a form use:

<a href="http://www.lastminute.com/"><button>Click Here</button></a>

LJK
10-13-2005, 10:21 PM
Hi -
Just out of curiosity, before reading the last post, I'd tried:

<a href="2colmac.htm" title="view another example"><button name="click" value="click"style="height:20px; width:60px;">click</button></a>

and it worked in F-fox 1.04 but not IE 6...why?

Thanks,
El

k0r54
10-14-2005, 11:40 AM
same thing for me ??,

Thanks for all your posts