View Full Version : create button pls help
hariprasad
07-04-2006, 11:27 AM
i have created a button using the code
<html>
<body>
<form>
<input type="button" value="Hello world!">
</form>
</body>
</html>
i want to add url to this button ie wen i click this button the download should start ( url window should open ) pls help
shachi
07-04-2006, 12:20 PM
You should either use:
<form action="somefile.php">
<input type="button" value="Hello world!">
</form>
Or use javascript:
<input type="button" value="Hello World!" onclick="doSomething();">
Hope it helps.
<form action="yourfile.zip" target="_blank">
<input type="submit" value="Hello world!">
</form>
shachi
07-04-2006, 12:35 PM
I really wish there was something like
<input type="button" href="somewhere.html" value="Go somewhere!!">
LOL.
If it was only allowed to create custom attributes then I would have built one for myself with javascript. If only ....
If it was only allowed to create custom attributes then I would have built one for myself with javascript. If only ....Not a good idea. Javascript should be avoided wherever a non-Javascript alternative can't be offered, and in this case the Javascript wouldn't actually do anything the alternative couldn't, so there'd be no point in having it :)
hariprasad
07-04-2006, 03:34 PM
thank you twey and shachi for your help.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.