Solved

Does anyone know how to stop Paypal buttons having a 'wide' border...?

Posted on 2004-08-21
6
170 Views
Last Modified: 2010-04-07
Hello,

Right, ive got my table of products and am putting a 'add to cart' button in the cell to the right of eack cell with the product info in, heres the code for the table...


<table width="498"  border="0" cellpadding="6">
                <tr>
                  <td width="150" height="152" align="left"><img src="images/Candle%20Lamps/candlelampclear.jpg" width="150" height="150"></td>
                  <td width="214" align="left" valign="baseline" class="text"><span class="style2">clear candle lamp bc </span></td>
                  <td align="left" valign="baseline" class="text">&nbsp;</td>
                </tr>
                <tr>
                  <td colspan="2" align="left" valign="top" class="titles">40w clear candle lamp </td>
                  <td width="90" align="center" valign="baseline"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                        <input type="hidden" name="cmd" value="_cart">
                        <input type="hidden" name="add" value="1">
                        <input type="hidden" name="bn" value="webassist.dreamweaver.4_0_1">
                        <input type="hidden" name="business" value="checkout@sparkyselectrical.co.uk">
                        <input type="hidden" name="item_name" value="g">
                        <input type="hidden" name="item_number" value="g">
                        <input type="hidden" name="amount" value="5">
                        <input type="hidden" name="currency_code" value="GBP">
                        <input type="hidden" name="return" value="http://www.sparkyselectrical.co.uk/success">
                        <input type="hidden" name="cancel_return" value="http://www.sparkyselectrical.co.uk/cancel">
                        <input type="hidden" name="receiver_email" value="checkout@sparkyselectrical.co.uk">
                        <input type="hidden" name="mrb" value="R-3WH47588B4505740X">
                        <input type="hidden" name="pal" value="ANNSXSLJLYR2A">
                        <input type="hidden" name="no_shipping" value="0">
                        <input type="hidden" name="no_note" value="0">
                        <input type="image" name="submit" src="http://images.paypal.com/images/x-click-but10.gif" alt="Make payments with PayPal - it's fast, free and secure!">
                  </form></td>
                </tr>
                <tr>
                  <td colspan="2" align="left" valign="top" class="titles">40w clear candle lamp branded </td>
                  <td align="center" valign="baseline"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                      <input type="hidden" name="cmd" value="_cart">
                      <input type="hidden" name="add" value="1">
                      <input type="hidden" name="bn" value="webassist.dreamweaver.4_0_1">
                      <input type="hidden" name="business" value="checkout@sparkyselectrical.co.uk">
                      <input type="hidden" name="item_name" value="d">
                      <input type="hidden" name="item_number" value="d">
                      <input type="hidden" name="amount" value="4">
                      <input type="hidden" name="currency_code" value="GBP">
                      <input type="hidden" name="return" value="http://www.sparkyselectrical.co.uk/success.htm">
                      <input type="hidden" name="cancel_return" value="http://www.sparkyselectrical.co.uk/cancel.htm">
                      <input type="hidden" name="receiver_email" value="checkout@sparkyselectrical.co.uk">
                      <input type="hidden" name="mrb" value="R-3WH47588B4505740X">
                      <input type="hidden" name="pal" value="ANNSXSLJLYR2A">
                      <input type="hidden" name="no_shipping" value="0">
                      <input type="hidden" name="no_note" value="0">
                      <input type="image" name="submit" src="http://images.paypal.com/images/x-click-but10.gif" alt="Make payments with PayPal - it's fast, free and secure!">
                  </form></td>
                </tr>
                <tr>
                  <td colspan="2" align="left" valign="top" class="titles">60w clear candle lamp </td>
                  <td align="center" valign="baseline"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                      <input type="hidden" name="cmd" value="_cart">
                      <input type="hidden" name="add" value="1">
                      <input type="hidden" name="bn" value="webassist.dreamweaver.4_0_1">
                      <input type="hidden" name="business" value="checkout@sparkyselectrical.co.uk">
                      <input type="hidden" name="item_name" value="5">
                      <input type="hidden" name="item_number" value="5">
                      <input type="hidden" name="amount" value="6">
                      <input type="hidden" name="currency_code" value="GBP">
                      <input type="hidden" name="return" value="http://www.sparkyselectrical.co.uk/success.htm">
                      <input type="hidden" name="cancel_return" value="http://www.sparkyselectrical.co.uk/cancel.htm">
                      <input type="hidden" name="receiver_email" value="checkout@sparkyselectrical.co.uk">
                      <input type="hidden" name="mrb" value="R-3WH47588B4505740X">
                      <input type="hidden" name="pal" value="ANNSXSLJLYR2A">
                      <input type="hidden" name="no_shipping" value="0">
                      <input type="hidden" name="no_note" value="0">
                      <input type="image" name="submit" src="http://images.paypal.com/images/x-click-but10.gif"  >
                  </form></td>
                </tr>
                <tr>
                  <td colspan="2" align="left" valign="top" class="titles">60w clear candle lamp branded </td>
                  <td width="90" align="center" valign="baseline"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                      <input type="hidden" name="cmd" value="_cart">
                      <input type="hidden" name="add" value="1">
                      <input type="hidden" name="bn" value="webassist.dreamweaver.4_0_1">
                      <input type="hidden" name="business" value="checkout@sparkyselectrical.co.uk">
                      <input type="hidden" name="item_name" value="t">
                      <input type="hidden" name="item_number" value="t">
                      <input type="hidden" name="amount" value="4">
                      <input type="hidden" name="currency_code" value="GBP">
                      <input type="hidden" name="return" value="http://www.sparkyselectrical.co.uk/success.htm">
                      <input type="hidden" name="cancel_return" value="http://www.sparkyselectrical.co.uk/cancel.htm">
                      <input type="hidden" name="receiver_email" value="checkout@sparkyselectrical.co.uk">
                      <input type="hidden" name="mrb" value="R-3WH47588B4505740X">
                      <input type="hidden" name="pal" value="ANNSXSLJLYR2A">
                      <input type="hidden" name="no_shipping" value="0">
                      <input type="hidden" name="no_note" value="0">
                      <input type="image" name="submit" src="http://images.paypal.com/images/x-click-but10.gif" alt="Make payments with PayPal - it's fast, free and secure!">
                  </form></td>
                </tr>
               
              </table>


I was wondering if anyone knows how to stop the buttons spreading the table, so it looks the same as it does when working on it in dreamweaver...?

If not i would appreciate any ideas of a different layout...?

many thanks

mat
0
Comment
Question by:mhaysom123
  • 4
  • 2
6 Comments
 

Author Comment

by:mhaysom123
Comment Utility
Forgot to say, I am using DW MX, with the Webassist Paypal extension, if that is any help...?
0
 
LVL 15

Expert Comment

by:Colosseo
Comment Utility
Hi

I just installed the paypal extension and tried your page

do you mean stop the spreading horizontally or vertically?

Regards

Scott
0
 

Author Comment

by:mhaysom123
Comment Utility
I think its vertical mainly, i think there is a slight border on the horizontal aswell, ideally i would like it to have no borders....thats if its possible....

thanks for looking

mat
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 15

Accepted Solution

by:
Colosseo earned 250 total points
Comment Utility
Hi

the forms that you have inside the td were spacing the form

I have had a go at removing all the forms (you had 4) and putting one around the entire table. there were several hidden tags which were the same for each entry so they are fixed in the main form.

item_name,item_number,amount,no_shipping,no_note were the fields which either did or i thought were likely to change. Each Add to cart image for each row  now calls the javascript function add_Item and passes the values for the above fields. These hidden fields are then set and the form submits.

It seems to work for me but maybe you can give it a try.

At the very least having the forms inside the table is what was causing the problem with the spacing

Hope that at least points you in the write direction

<html>
<head>

</head>
<script language="JavaScript" type="text/JavaScript">
 
  function add_Item(item_name,item_number,amount,no_shipping,no_note) {
    document.getElementById("item_name").value = item_name
    document.getElementById("item_number").value = item_number
    document.getElementById("amount").value = amount
    document.getElementById("no_shipping").value = no_shipping
    document.getElementById("no_note").value = no_note
    frm_Main.submit();
  }

</script>

<body>
<form target="paypal" name="frm_Main" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                      <input type="hidden" name="cmd" value="_cart">
                      <input type="hidden" name="add" value="1">
                      <input type="hidden" name="bn" value="webassist.dreamweaver.4_0_1">
                      <input type="hidden" name="return" value="http://www.sparkyselectrical.co.uk/success.htm">
                      <input type="hidden" name="cancel_return" value="http://www.sparkyselectrical.co.uk/cancel.htm">
                      <input type="hidden" name="receiver_email" value="checkout@sparkyselectrical.co.uk">
                      <input type="hidden" name="mrb" value="R-3WH47588B4505740X">
                      <input type="hidden" name="pal" value="ANNSXSLJLYR2A">
                      <input type="hidden" name="business" value="checkout@sparkyselectrical.co.uk">
                      <input type="hidden" name="currency_code" value="GBP">
                                
                                <input type="hidden" name="item_name" value="">
                      <input type="hidden" name="item_number" value="">
                      <input type="hidden" name="amount" value="">
                      <input type="hidden" name="no_shipping" value="">
                      <input type="hidden" name="no_note" value="">

<table width="454" border="0" cellpadding="0">
                <tr>
                  <td width="150" height="152" align="left"><img src="images/Candle%20Lamps/candlelampclear.jpg" width="150" height="150"></td>
                  <td width="214" align="left" valign="baseline" class="text"><span class="style2">clear candle lamp bc </span></td>
                  <td width="90" align="left" valign="baseline" class="text">&nbsp;</td>
                </tr>
                <tr>
                  <td colspan="2" align="left" valign="top" class="titles">40w clear candle lamp </td>
                  <td width="90" align="center" ><input onClick="add_Item('g','g','5','0','0');" type="image" src="http://images.paypal.com/images/x-click-but10.gif" alt="Make payments with PayPal - it's fast, free and secure!"></td>
                </tr>
                <tr>
                  <td colspan="2" align="left" valign="top" class="titles">40w clear candle lamp branded </td>
                  <td align="center" valign="baseline"><input onClick="add_Item('d','d','6','0','0');" name="add" type="image" src="http://images.paypal.com/images/x-click-but10.gif" alt="Make payments with PayPal - it's fast, free and secure!"></td>
                </tr>
                <tr>
                  <td colspan="2" align="left" valign="top" class="titles">60w clear candle lamp </td>
                  <td align="center" valign="baseline"><input onClick="add_Item('5','5','6','0','0');" name="add" type="image" src="http://images.paypal.com/images/x-click-but10.gif" alt="Make payments with PayPal - it's fast, free and secure!"></td>
                </tr>
                <tr>
                  <td colspan="2" align="left" valign="top" class="titles">60w clear candle lamp branded </td>
                  <td width="90" align="center" valign="baseline"><input onClick="add_Item('t','t','4','0','0');" name="add" type="image" src="http://images.paypal.com/images/x-click-but10.gif" alt="Make payments with PayPal - it's fast, free and secure!">
                 </td>
                </tr>
               
              </table>
                     </form>

</body>
</html>

Cheers

Scott
0
 

Author Comment

by:mhaysom123
Comment Utility
Hi,

Thats great, thank you!!!!! The table works just as i wanted/needed it to...!

Thanks for your time and your solution!

Many thanks,

Mat.
0
 

Author Comment

by:mhaysom123
Comment Utility
Hello again, hopefully you will see this post...

I have made the table, the original one part of a template and now you have shown me that code i cant find a way of adding it to my template page, this is the code..


<table width="498"  border="0" cellpadding="6">
                  <tr>
                    <td width="150" height="152" align="left"><!-- TemplateBeginEditable name="image" --><img src="../cableandacc/images/accessories/crimps/roundlugcrimps.jpg" width="150" height="150"><!-- TemplateEndEditable --></td>
                    <td width="214" align="left" valign="baseline" class="text"><!-- TemplateBeginEditable name="description" --><span class="style2">Brief description of product, not sure, im just typing anything to fill up the space so i can see what it looks like with lots of words in and ..uh yeah whatever : ) </span><!-- TemplateEndEditable --></td>
                    <td align="left" valign="baseline" class="text">&nbsp;</td>
                  </tr>
                  <!-- TemplateBeginEditable name="product" -->
                  <tr>
                    <td colspan="2" align="left" valign="top" class="titles">gfj jdj jkds fj jdsjf fdsj </td>
                    <td width="90" align="center" valign="baseline"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                        <input type="hidden" name="cmd" value="_cart">
                        <input type="hidden" name="add" value="1">
                        <input type="hidden" name="bn" value="webassist.dreamweaver.4_0_1">
                        <input type="hidden" name="business" value="checkout@sparkyselectrical.co.uk">
                        <input type="hidden" name="item_name" value="g">
                        <input type="hidden" name="item_number" value="g">
                        <input type="hidden" name="amount" value="5">
                        <input type="hidden" name="currency_code" value="GBP">
                        <input type="hidden" name="return" value="http://www.sparkyselectrical.co.uk/success">
                        <input type="hidden" name="cancel_return" value="http://www.sparkyselectrical.co.uk/cancel">
                        <input type="hidden" name="receiver_email" value="checkout@sparkyselectrical.co.uk">
                        <input type="hidden" name="mrb" value="R-3WH47588B4505740X">
                        <input type="hidden" name="pal" value="ANNSXSLJLYR2A">
                        <input type="hidden" name="no_shipping" value="0">
                        <input type="hidden" name="no_note" value="0">
                        <input type="image" name="submit" src="http://images.paypal.com/images/x-click-but10.gif" alt="Make payments with PayPal - it's fast, free and secure!">
                    </form></td>
                  </tr>
                  <!-- TemplateEndEditable -->
                </table>


what it is, i was planning on splitting the bottom row into the amount needed for each product, they vary alot, and then i was going to add a 'add to cart' button in each of the new split cells... i think i need to make that table a form and will that then hold the buttons in the way the code you added....?

hope you can help.

mat
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now