Hello,
I have been modifying my companys web site and I have a question about Forms. On my site you can buy products and the "Add to cart" button is the default grey buttons. I would like to change these default buttons to a more colorful button that I have seen on other sites. Can anyone give me some ideas on how to do this or where i can go to learn how to change these buttons?
TIA!

Erik Schrank

Recommended Answers

All 4 Replies

Make any link, image, button, or other "widget" a submit button by simply attaching JavaScript to it.

For example, a hyperlink can be:

<a href="" onclick="myForm.submit()">Submit me!</a>

The key is that the form has a "submit" method, that you can call from almost anywhere.

By Calling Javascript function, how to post the form to another page or how will action tag work by calling the javascript function.

reply to me at 'yk123in@yahoo.co.in'

javscript is so passe, so blockable, so insecure -=resides on the user browser

input.submit {background: bla bla bla; color: bla bla bla; width:bla; height;bla; /* any other css bla bla bla */ }
input.submit:hover {background: otherbla bla bla; color: otherbla bla bla; width:bla; height;bla}
input.submit:active {background: otherotherbla bla bla; color: otherotherbla bla bla; width:bla; height;bla}
input.submit:focus {background: otherbla bla bla; color: otherbla bla bla; width:bla+10; height;bla+5}[

You can put use the <button></button> tag around an image.

<BUTTON TYPE=SUBMIT>
     <IMG SRC="/this/leads/to/your/button/image/!!" HEIGHT="97" WIDTH="105" ALT="Starflower" ALIGN="ABSMIDDLE"><STRONG>Keep this blank or not...</STRONG></BUTTON>

Difference Between the <input> Tag and <button> Tag:
At first glance, it may appear that there's not much difference between using the <button> tag and <input> tag. But there are some differences.

The main difference is that the <button> tag allows you to place HTML code in between the opening and closing tags. The <input> tag is an empty tag (i.e. it doesn't have a closing tag), so you can't add content to the tag.

Another key difference between the two tags is with the value attribute. The <input> tag uses this attribute to display a label on the button (e.g. "Click me!"). With the <button> tag, on the other hand, the value attribute is submitted along with any form contents and can be used for processing.


http://www.quackit.com/html/codes/html_button.cfm

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.