- -
 Adding PayPal Buttons in iWeb
 
How to add PayPal Donate buttons and other HTML items
I am outlining the procedure for a PayPal Donate button, but you can use this technique to cut and paste HTML into published iWeb pages. iWeb 2.0 update: You can now use the HTML snippet facility to add HTML directly within iWeb itself - click here for details.
 
First, get the HTML code you need for your PayPal button from PayPal themselves. You need an account with them already to do this. Go to PayPal > Merchant Tools > Website Payments > Donations. Create your button. Copy and save the HTML code that is produced.
 
In iWeb, on the page where you exactly want your PayPal button to appear, make a text box the size of the button required. For example, for the PayPal Donate button on this page, it would be 92 px by 26 px.
-
 
Type some unique text in the box, like PayPalHTML. This just aids finding it later when you come to find and replace with the HTML code. You can align this text horizontally (i.e., left, right or centre) and you need to size it so that it fits on only one line, but leave the vertical alignment alone (i.e., don’t centre the text vertically) otherwise the text box will turn into a graphic.
-
 
Publish your site now. If you publish to a folder, go to this folder to find the relevant page. The name of this page will be yourpage.html where yourpage is the name of the page in which you put the PayPal text box.
 
Open this page in TextEdit. - If you have published to .mac, in TextEdit, go to
File > Open, select your iDisk in the left bar, and navigate to
Web/Sites/iWeb/yoursitename/yourpage.html
 
You will see a load of HTML text. If you don't see text and instead see what looks like a webpage, go to TextEdit > Preferences > Open and Save and check the box 'ignore rich text commands in HTML files'.- Now re-open the file and you should see the HTML text.
 
In TextEdit, go to Edit > Find > Find.
 
Type PayPalHTML into the 'Find' box (the unique text you typed into the text box).
Paste the HTML code you got from PayPal into the 'Replace with' box.
Untick the box 'ignore case'. Click 'Replace All'.
- 
Then save this edited file. If you published to a folder, you need to upload it with the rest of your site.
 
Please remember that you need to do this every time you republish the site. However, if you save a local copy of the changed file, as long as no other changes are required on the page, you can save yourself time by uploading this saved copy each time. See this article for details of selective uploading of changed files. An alternative (and quicker method) to using a saved copy is to use the free search and replace utility, MassReplaceIt. You simply set up a search to replace the unique text PayPalHTML with your PayPal button code and it will be done in a few seconds. I use this program on many of my pages.
 
An alternative method of getting a PayPal button is shown here which does away with the need to cut and paste each time you publish. Check it out. It will not however enable you to have a shopping basket or an encrypted paypal button. I am however, detailing this method here, as the same principles apply to adding other HTML code, like advertising banners, counters, javascript snippets and such like.
 
You can see examples of this technique in action on our articles and media page (amongst others!).
 
 
Got any comments or feedback or need help? Let me know!        
 
 
cut and paste HTML made easy
The technique described here is being used for display the working paypal button above
-
  1. You are here: Home > iWeb Articles > Adding PayPal Buttons in iWeb
help?
popup search backgroundpopup search imagepopup search close button
 
Web www.rowan-cottage.co.uk