...

View Full Version : Coding a Paypal Box help



jackie boy
11-17-2010, 09:25 PM
i have this paypal code(below)for a paypal button i want to put on my site, however i want it in a certain position on the page, can someone tell me how to do it? i also have the position measurements of where i want it (below)

Paypal Code

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="CT5VYBEEAL9T4">
<table>
<tr><td><input type="hidden" name="on0" value="Select Quanity">Select Quanity</td></tr><tr><td><select name="os0">
<option value="1 | Lease">1 | Lease $22.00</option>
<option value="2 | Leases">2 | Leases $44.00</option>
<option value="4 | Leases">4 | Leases $88.00</option>
<option value="7 | Leases">7 | Leases $110.00</option>
<option value="10 | Leases">10 | Leases $170.00</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Name of Beat(s) Here:">Name of Beat(s) Here:</td></tr><tr><td><input type="text" name="os1" maxlength="60"></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>



Position Code date

div.paypal {position: absolute;top: 0;left: 50;margin-left: 620px;width: 270px;height: 170px; margin-top:620px; z-index:6; }

jackie boy
11-17-2010, 10:52 PM
i'll give $10 to anyone who can tell me how to integrate the code

MattF
11-17-2010, 11:14 PM
div#paypal {position: absolute;top: 0;left: 50;margin-left: 620px;width: 270px;height: 170px; margin-top:620px; z-index:6; }

You've already answered your own question with the above CSS. Wrap the form in a div. I'd use an id instead of a class though, (CSS already adjusted accordingly). You could also just add the id directly to the form and use #paypal instead of div#paypal, (each id on a page must be unique), and not bother with the containing div. Just use whichever method rocks your boat.




<div id="paypal">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="CT5VYBEEAL9T4">
<table>
<tr><td><input type="hidden" name="on0" value="Select Quanity">Select Quanity</td></tr><tr><td><select name="os0">
<option value="1 | Lease">1 | Lease $22.00</option>
<option value="2 | Leases">2 | Leases $44.00</option>
<option value="4 | Leases">4 | Leases $88.00</option>
<option value="7 | Leases">7 | Leases $110.00</option>
<option value="10 | Leases">10 | Leases $170.00</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Name of Beat(s) Here:">Name of Beat(s) Here:</td></tr><tr><td><input type="text" name="os1" maxlength="60"></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
</div>

teedoff
11-17-2010, 11:41 PM
lol That was an easy $10!

jackie boy
11-18-2010, 12:55 AM
div#paypal {position: absolute;top: 0;left: 50;margin-left: 620px;width: 270px;height: 170px; margin-top:620px; z-index:6; }

You've already answered your own question with the above CSS. Wrap the form in a div. I'd use an id instead of a class though, (CSS already adjusted accordingly). You could also just add the id directly to the form and use #paypal instead of div#paypal, (each id on a page must be unique), and not bother with the containing div. Just use whichever method rocks your boat.




<div id="paypal">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="CT5VYBEEAL9T4">
<table>
<tr><td><input type="hidden" name="on0" value="Select Quanity">Select Quanity</td></tr><tr><td><select name="os0">
<option value="1 | Lease">1 | Lease $22.00</option>
<option value="2 | Leases">2 | Leases $44.00</option>
<option value="4 | Leases">4 | Leases $88.00</option>
<option value="7 | Leases">7 | Leases $110.00</option>
<option value="10 | Leases">10 | Leases $170.00</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Name of Beat(s) Here:">Name of Beat(s) Here:</td></tr><tr><td><input type="text" name="os1" maxlength="60"></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
</div>


hey thanks for the help, however i'm a bit confused, where about do i paste this in the CSS?

when you say ID what do you mean? where do i get the ID from? i'm clueless

here is my page, http://www.soundclick.com/thesynthesis , you see where it says "Store" i need the paypal button directly under there,

MattF
11-18-2010, 01:15 AM
You already have the container and CSS in place, by the looks of it, so forget those. Where this div is in your template file, (or wherever you've placed it):



<div class="paypal">
<center>
<br />
<br />paypal
<br />paypal
<br />paypal

<br />paypal

</center>
</div>


just remove those paypal text lines and place the form code in there like so and you should be sorted.



<div class="paypal">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="CT5VYBEEAL9T4">
<table>
<tr><td><input type="hidden" name="on0" value="Select Quanity">Select Quanity</td></tr><tr><td><select name="os0">
<option value="1 | Lease">1 | Lease $22.00</option>
<option value="2 | Leases">2 | Leases $44.00</option>
<option value="4 | Leases">4 | Leases $88.00</option>
<option value="7 | Leases">7 | Leases $110.00</option>
<option value="10 | Leases">10 | Leases $170.00</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Name of Beat(s) Here:">Name of Beat(s) Here:</td></tr><tr><td><input type="text" name="os1" maxlength="60"></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
</div>

jackie boy
11-18-2010, 01:32 AM
Matt, if you go on to my page now, you will see the paypal button is there now, which i'm very happy about, however i need it directly under the "store" heading, and in line with the music player, if you know what i mean? at the moment it is not positioned right, looks out of place, how do i correct this?

this is the code i used


<div class="paypal">
<center>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="CT5VYBEEAL9T4">
<table>
<tr><td><input type="hidden" name="on0" value="Select Quanity">Select Quanity</td></tr><tr><td><select name="os0">
<option value="1 | Lease">1 | Lease $22.00</option>
<option value="2 | Leases">2 | Leases $44.00</option>
<option value="4 | Leases">4 | Leases $88.00</option>
<option value="7 | Leases">7 | Leases $110.00</option>
<option value="10 | Leases">10 | Leases $170.00</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Name of Beat(s) Here:">Name of Beat(s) Here:</td></tr><tr><td><input type="text" name="os1" maxlength="60"></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>

</center>
</div>

MattF
11-18-2010, 01:39 AM
This code you posted earlier:



Position Code date

div.paypal {position: absolute;top: 0;left: 50;margin-left: 620px;width: 270px;height: 170px; margin-top:620px; z-index:6; }


Whichever stylesheet you have placed that in, edit the top-margin setting to pull it further up the page. Try something like: margin-top:590px; for starters and then work from there. Btw, you can remove those <center></center> tags from that block of code. They're unnecessary.

jackie boy
11-18-2010, 01:50 AM
wow yes, i'm a programming genius lmao jk

matt send me your paypal info

by the ways thankyou very much you saved me from a stressful event, i also learn something

MattF
11-18-2010, 03:22 AM
Just on a tangent, you have a typo. You're missing a 't' in quantity in your form code.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum