PDA

View Full Version : Cannot add second button without affecting the first?


Xmasbaby
03-16-2011, 05:57 PM
I am working on a site that was built by someone else (so I am limited by certain aspects of this design). All I need to do is add in two Paypal buttons to the homepage. The problem is when I put them where they belong (in Dreamweaver design view) they either merge together, or they do not work correctly when previewed in a browser. The code came right from Paypal, so I don't think that is the issue?

I have loaded both buttons on this test page: http://phantomphleece.com/test.html - they are functioning correctly here (although I will be replacing the second image). I am attaching the code for the page I am working on. (this code has both buttons on the page, but they are not working correctly)

The live site is here: http://www.centsablebookkeeping.com/ (so you can see what it looks like) - Although the second button is not here because I can't get it to work! I just want to add the second button below the first.

Can anyone tell me how to do this & keep the functioniallity of the buttons?

johnMoss
03-17-2011, 02:50 AM
You say they are not working on your computer but they work fine on an uploaded page? Before even looking at your code I say go ahead and upload to the server and see what happens... Upload your entire file to a test site as you have done with the example..

Xmasbaby
03-17-2011, 01:22 PM
You say they are not working on your computer but they work fine on an uploaded page? Before even looking at your code I say go ahead and upload to the server and see what happens... Upload your entire file to a test site as you have done with the example..

Oh, I have done this - several times. (I had to remove the second button from the live site so the owner could still receive payments while I try and figure this out) - The entire page was posted on a test site also, and still did not work. The buttons work on a blank page - but not inside the design on the real page.

gentleone
03-17-2011, 02:49 PM
The buttons work on a blank page - but not inside the design on the real page.
I've compared the code from your test page and the live site and saw that the paypal code for the second button on the live site is not complete. You open and close the form tag (and for some reason twice :confused: ), but in between there is nothing, so that's why you don't see a second button. An easy fix to solve this could be done in code view, but in design view I don't have a clue.

This is the code for the second button on the test page:

<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="AXD3QLLWRUVNA">
<input type="image" src="http://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">

<img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/scr/pixel.gif" width="1" height="1"> ...on an open invoice
</form>

And this is what you have on the live site (in index.html):
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
</form></p>
</div>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
</form>

Al you have to do in code view is to delete one form tag in index.html and replace the other one with the form tag (including input fields etc.) from the test page.

Xmasbaby
03-17-2011, 03:10 PM
There is only one button on the live site (I took the other off because it wasn't working) ... I included the code for the page with both buttons (where it is not working) ... where did you find the coding error - on the live site - or in the code I attached?

gentleone
03-17-2011, 03:23 PM
I've tested it with Firebug... if I copy the code for the second button to index.html it shows up and if click on that button I get redirected to Paypal to make a donation, so to me it just works.

Xmasbaby
03-17-2011, 03:41 PM
... but for me it is not working???

If the second button works, the first one doesn't, and vice versa?

Forget looking at the live site - there is no problem there right now. The problem is in the code.txt (that I attached) ... load that into Dreamweaver - preview it in a browser, and then you will see the problem.

gentleone
03-17-2011, 03:51 PM
I've opened the text file and saw there was an error in the code for the second button. I've fixed it and should be okay now.... just copy the code below.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>cents-able Bookkeeping, LLC</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" />
<meta name="author" content="Laura Dion" />
<meta name="description" content="Home of Cents-able bookkeeping, LLC a professional Quickbooks online consultant" />
<meta name="keywords" content="Cents-able, centsable, bookkeeping, Quickbooks, Support, Online, Proadvisor, Laura, Dion"/>
<meta NAME="distribution" CONTENT="GLOBAL"/>
<link href="styles/screen.css" rel="stylesheet" type="text/css" media="screen" />
<!--[if lt IE 7]>
<link href="styles/ie6.css" rel="stylesheet" type="text/css" media="screen" />
<![endif]-->
<style type="text/css">
<!--
.style6 {font-size: 16px}
.style8 {font-size: 18px}
-->
</style>
</head>
<body>
<div id="container">
<div id="header">
<h1 class="hidden">cents-able Bookkeeping, LLC</h1>
<h2 class="hidden">Professional Quickbooks Advisor</h2>
</div>
<div id="navigation">
<ul>
<li><a href="index.html" id="btnHome" class="current">Home</a></li>
<li><a href="about.html" id="btnAbout">About Laura</a></li>
<li><a href="services.html" id="btnServices">Services</a></li>
<li><a href="connect.html" id="btnConnect">Connect Now</a></li>
<li><a href="contact.html" id="btnContact">Contact</a></li>
</ul>
</div>
<div id="content">
<div id="accent">
<div id="LauraHomeTxt">
<p>Trust Laura Dion, Advanced Certified QuickBooks ProAdvisor, to assist you in using your QuickBooks program.</p>
<p>With over 12 years experience and a 5-star <img src="images/rating.gif" alt="" width="75" height="14" /> rating on the Intuit ProAdvisor website, Laura can provide all the QuickBooks support that your business needs.</p>
<p>Email her today at:</p>
<a href="mailto:support@centsablebookkeeping.com">support@centsablebookkeeping.com</a> </div>
<p><img id="ProAdvisorAdv" src="images/newlogo.gif" width="288" height="190" alt="Certified QuickBooks Advanced ProAdvisor"/></p>
<p><img id="Lauraimg" src="images/lauradion2.jpg" width="126" height="147" alt="Laura Dion" /> </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<center>
</center>
<div id="accentdash"> </div>
<div id="triptych">
<div id="servicespanel">
<h1 class="hidden">Services</h1>
<p><img src="images/ourservicestxt.jpg" width="143" height="19" alt="Services" /> </p>
<h2 align="left">QuickBooks Consulting</h2>
<h2 align="left">QuickBooks Setup</h2>
<h2 align="left">QuickBooks Phone Consultation</h2>
<h2 align="left">QuickBooks Remote Access</h2>
<h2 align="left">QuickBooks Training &amp; Seminars</h2>

<div align="center">
<ul>
<li></li>
</ul>
<ul>
</ul>
</div>
<ul>
</ul>
<ul>
</ul>
<p>&nbsp;</p>
<p>&nbsp; </p>
<h2>&nbsp;</h2>
</div>

<div id="testimonialpanel">
<h1 class="hidden">Testimonials</h1>
<img src="images/testimonialstxt.jpg" width="143" height="19" alt="Testimonials" />
<p>&nbsp;</p>
<p><span class="style6">�<span class="style8">I give Laura five stars!<br />
Laura is a rare find. If you are an attorney using Quickbooks she is the gold standard!&quot; ... <a href="testimonials.html">MORE</a></span></span></p>
<p>&nbsp;</p>
</div>
<div id="purchasepanel">
<h1 class="hidden">Purchase Support</h1>
<img src="images/purchasetxt.jpg" width="204" height="19" alt="Purchase Support" />
<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="UD6JWA5649FAU">
<table>
<tr><td><input type="hidden" name="on0" value="Options">
<input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/btn/btn_paynow_LG.gif" border="0" name="submit2" alt="PayPal - The safer, easier way to pay online!" />
Choose from the dropdown menu</td>
</tr><tr><td><select name="os0">
<option value="Initial consultation (.5 hr)">Initial consultation (.5 hr) $45.00</option>
<option value="Basic new file setup/customization">Basic new file setup/customization $165.00</option>

<option value="Pre-payment for services (3 hr)">Pre-payment for services (3 hr) $285.00</option>

</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">

<p>
<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="AXD3QLLWRUVNA">
<input type="image" src="images/payment.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">

<img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/scr/pixel.gif" width="1" height="1"> ...on an open invoice</p>
<p>&nbsp;</p>
</form>
</div>
</div>
<div id="footer">
<ul id="metanav">
<li><a href="index.html">Home</a></li>
<li><a href="about.html"">About Laura</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="connect.html">Connect Now</a></li>
<li class="last"><a href="contact.html">Contact Laura</a></li>
</ul>
<div id="developer"> <a href="http://www.finewebworking.com" title="Creative Website Development">Site: www.FineWebworking.com</a></div>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10997770-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>

gentleone
03-17-2011, 03:54 PM
I see also now that you have a double quotation mark error in the metanav.

Xmasbaby
03-17-2011, 03:55 PM
Thank you so much! I just uploaded this new code, previewed it in the browser, and both buttons are going to the same place (the second one is correct) but the first one is still not working - it is going to the link for the second button. This is what keeps happening - only one or the other will work, but not at the same time?