/    Sign up×
Community /Pin to ProfileBookmark

using a button without a form

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

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@csymjsOct 13.2005 — Try something like this:

[code=html]<input type="button" name="" value="Click Here" onclick="parent.location.href='http://www.lastminute.com';" />[/code]
Copy linkTweet thisAlerts:
@felgallOct 13.2005 — 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>
Copy linkTweet thisAlerts:
@LJKOct 14.2005 — Hi -

Just out of curiosity, before reading the last post, I'd tried:
[code=html]
<a href="2colmac.htm" title="view another example"><button name="click" value="click"style="height:20px; width:60px;">click</button></a>
[/code]

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

Thanks,

El
Copy linkTweet thisAlerts:
@k0r54authorOct 14.2005 — same thing for me ??,

Thanks for all your posts
×

Success!

Help @k0r54 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...