I'd like to make a simple html form where a person can upvote or downvote an item. However I don't like the default look of a <input type="submit">
. What other options do I have to send a POST request than a bulky, default button?
views:
783answers:
9You can also call the "submit" directly from javascript. See here.
document.myform.submit();
This allows you to use basically anything as a control that will submit your form.
You can also make pretty buttons with just css, here's a nice article:
http://particletree.com/features/rediscovering-the-button-element/
Check out this page to see what can be done with CSS Styled Buttons...theyll make you're website feel more alive and interactive to users.
Don' forget, the last thing you want your users to do on your website is think ...so having clearly defined buttons is a big help.
you can use JQuery framework its javascript library ,you can use default image or span or div or anything else even anchor tags to do submit button its easy to use and can post form data by post method or get method through ajax just visit JQuery website :JQuery
Like above mentioned techniques, I would recommend either image buttons or designing boxes with to create a nice and simple css-button.
Simplicity can be very well used.
CSS power: http://www.zengarden.com
You can use a highly configurable component such as Button in YUI. You get the chance to modify the looks of it and a lot (perhaps too much for your need) extra functionality as a bonus on top of that.
You can easily style those buttons with CSS. Unfortunately IE does not support :active selector for buttons, so you'll have to use JavaScript if you have a separate style for a pressed button.
If you want to upvote/downvote an item in ajax/web2 style (like stackoverflow), don't use forms at all. Use javascript, and send an asynchronous POST request and populate it manually. You can use jQuery to help you automate some stuff.
Quickly googling "ajax jquery" gives a bunch of results, here's one of them