[thelist] I agree to terms with a PayPal button

Administrative HQ english_offline at yahoo.com
Sat Jan 15 10:38:47 CST 2011

Our code is like this:

In the head:

//"Accept terms" form submission- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
var checkobj
function agreesubmit(el){
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){  //hunt down submit button
var tempobj=checkobj.form.elements[i]
function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
alert("Please read/accept terms to submit form")
return false

In the body:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" 
onSubmit="return defaultagree(this)">
<input name="agreecheck" type="checkbox" onClick="agreesubmit(this)"><b>I agree 
to the <a href="TOS.shtm" target="_blank">Terms of Service</a></b><br>
                                  <input type="hidden" name="cmd" 
                                  <input type="hidden" name="business" 
value=yourPayPaladdress at some.com>
                                  <input type="hidden" name="no_note" value="1">
                                  <input type="hidden" name="currency_code" 
                                  <input type="hidden" name="tax" value="0">
                                  <center><input type="submit" 
src="images/x-click-but02.gif" border="0" name="submit" value="PayPal Payments" 
alt="Donate with PayPal - it's fast, free and secure!" disabled></center>

The button is from PayPal ... use yours.

Works fine.

Good luck,

From: Bob Meetin <bobm at dottedi.biz>
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Sent: Fri, January 14, 2011 5:10:40 PM
Subject: Re: [thelist] I agree to terms with a PayPal button

Administrative HQ wrote:
> We've used this free code with a PayPal button:
>  http://www.dynamicdrive.com/dynamicindex16/acceptterm.htm
>  David
> ------------------------------------------------------------------------
> *From:* Bob Meetin <bobm at dottedi.biz>
> *To:* "thelist at lists.evolt.org" <thelist at lists.evolt.org>
> *Sent:* Thu, January 13, 2011 5:23:27 PM
> *Subject:* [thelist] I agree to terms with a PayPal button
> http://dottedi.biz/code/agree_with_paypal.html
> I got the I agree and checkbox code from a google search.  However, it needs to 
>work with a paypal/similar button as opposed to a submit button.  How do you 
>make it work to deactivate paypal until the checkbox is checked?
This is the same code that I grabbed and tested yesterday.  Again the problem is 
that I don't know how to modify it so that it grays out the PayPal button rather 
than a submit button.  What Mark emailed back was/is door #2.  I'm sure that I 
can redirect to a page with a paypal button, but not sure how to redirect 
directly to paypal.  I don't want to force the buyer to go through an extraneous 
extra page if avoidable. Maybe a variation of what Mark suggested is  the 
solution.  I'm sure there's an ajaxy way to expose a hidden field once you've 
clicked on "I agree" as well.

* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !


More information about the thelist mailing list