I love this article
“How to create Skype-like buttons using jQuery”
But the comment list is already closed so I need your help guys!
How to make this code to a form using submit method?
<a class="button" href="#">
<img src="*.png" alt="" />Add to cart</a>
This is the sample of my form where I want the css button to be inserted:
<form action="http://ww6.aitsafe.com/cf/addmulti.cfm" name="mal" method="post">
<input type="hidden" name="userid" value="">
<input type="hidden" name="return" value="">
<input type="hidden" name="nocart">
<input type="hidden" name="qty1" value="1">
<input type="hidden" name="product1" value="">
<input type="hidden" name="price1" value="150.00">
<input type=submit value="Add to Cart" onclick="alert('Added to cart\n\nThis page will refresh');">
update… yehey! 🙂
Thank You to PCALCAO for the link How best to make a link submit a form
There I found the answer of CHRIS to be very helfpful & now it’s working…
Correct answer:
<a class="button" href="#" onclick="document.mal.submit(); return false;">
<img src="*.png" alt="" />Add to cart</a>
🙂
I have no idea what you’re trying to do there… but!
Here it is:
http://www.w3schools.com/html/html_forms.asp
Read this, and you’ll learn a bit about forms and submit buttons.
When you figure the simple html part out, start thinking about the CSS and JQuery.
-EDIT-
You should really re-read that article!
For starters, it’s:
and not:
“class” is an attribute of an HTML element, not an element by itself. The element here is “a” (anchor).