Need HTML Help! How to make a picture the submit value of a form.?
-
Right, I have two questions. First - I'm making a website, and need some help. I've created a dropdown menu but want the button that directs you to the choice a picture, instead of text. Here is what I have atm: http://i40.tinypic.com/j6o1ms.jpg I want the PayPal 'Add to Cart' picture below the form to replace the boring box. Second question: When I hit the 'Add to Cart' button, it redirects the page, how can I set it up to open PayPal in a new tab? Code I'm using: <FORM ACTION="../cgi-bin/redirect.pl" METHOD=POST onSubmit="return dropdown(this.gourl)"> <SELECT NAME="gourl"> <OPTION VALUE="">Select a size... <OPTION VALUE="[PayPal link here]" >Small <OPTION VALUE="[PayPal link here]" >Medium <OPTION VALUE="[PayPal link here]" >Large </SELECT> <INPUT TYPE=SUBMIT VALUE=" Add to Cart "> </FORM> NOTE you need to add this JavaScript to the header in order for it to work. Thanks so much for your help! It's much appreciated! <SCRIPT TYPE="text/javascript"> <!-- function dropdown(mySel) { var myWin, myVal; myVal = mySel.options[mySel.selectedIndex].value… if(myVal) { if(mySel.form.target)myWin = parent[mySel.form.target]; else myWin = window; if (! myWin) return true; myWin.location = myVal; } return false; } //--> </SCRIPT>
-
Answer:
For your first question, you need to use CSS. A quick example would be: .button { background-image: url(image.png); border: none; width: yourImageWidth; height: yourImageHeight; } Then set up the HTML to be something like <input type="submit" class="button" value=" " /> Replace "image.png" with your image source, replace "yourImageWidth" with your image width, and replace "yourImageHeight" with your image height. As for answer 2, I don't think I've seen a proper way to open new tabs using JavaScript. Have a read through: http://www.webmasterworld.com/html/4064011.htm for some help.
Liam at Yahoo! Answers Visit the source
Related Q & A:
- How can you make a picture smaller?Best solution by Yahoo! Answers
- How to make a picture look like a drawing?Best solution by Yahoo! Answers
- How do I make a picture into a link?Best solution by Yahoo! Answers
- How to make a picture the fill of text?Best solution by Quora
- How to make a picture in my yahoo.email?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.