Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pay pal option modifications

Status
Not open for further replies.

escellentguy

Technical User
Nov 28, 2005
43
US
I am sorry I posted this incorrectly in another forum but I believe it should be in the JS forum.

I am trying to alter the default paypal button factory code to allow for more options on a e-commerce website. Pay pal allows for two input fields (either text or drop down) which works fine for most of our products, however, there are times when I would like to allow more selection options (which do not alter the price)

for example -- a shopper selects a bracelet ..... pay pal allows input from the shopper to provide "size" and "color"

however, our bracelets are customizable such that a shopper might choose to add a birthstone (multiple selection box) or a name (additional text input), etc.

Does anyone know of a good faq article I could read on this? I found

and the examples work great but it is very difficult to follow unless you are more advanced with JS.

Any help would be great concerning this.

Thank you.
 
Greetings!

If you know what all the fields are that you'll need ahead of time, then go ahead and put them in your HTML, even if they won't always be displayed. Be sure to give each of them a unique ID.

Example:
Code:
<INPUT TYPE="Text" CLASS="someClass" ID="someId" VALUE="">

When your shoper selects a different product, you'll have to call some sort of function to hide/display the appropriate input fields. In that routine, use this code to hide or display each control...

Code:
//to hide...
document.getElementById("someId").style.display = "NONE";

//to show...
document.getElementById("someId").style.display = "BLOCK";

Good luck!


---------------------
He who has knowledge spares his words, and a man of understanding is of a calm spirit. Even a fool is counted wise when he holds his peace; when he shuts his lips, he is considered perceptive. - King Solomon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top