lilian
lilian

Reputation: 181

Make link using submit button

Can I link one page to another page using submit button?

Upvotes: 1

Views: 11848

Answers (2)

kendo
kendo

Reputation: 21

The problem with using a submit form is that the next page will think that it has to deal with a binary request, which you can't do if using an upload form.

So you are better using a image button (can make it look like a submit button) or using JavaScript...

Open in a new window:

onClick="window.open('page.html');"

Open in the same window:

onClick="document.location.href = ('page.html');"

Upvotes: 2

Quentin
Quentin

Reputation: 943569

It sends all the wrong signals to the user, but:

<form action="some-uri"><div><input type="submit"></div></form>

Upvotes: 3

Related Questions