I have an html page that has 12 paypal buttons on it. Each button code has the paypal email address. Is there a way I can have that email address pull from one central text file or even one place from within that html page rather than having to change the email address 12 different times? I know it can be done in PHP but looking to do it for an html page.
You could just code it in PHP and then change your PHP configuration file to process .html files too.
Here's a way to do it with javascript, assuming you are using the standard form-based paypal button: <script> var newEmail = ; document.formName1.business.value=newEmail; document.formName2.business.value=newEmail; document.formName3.business.value=newEmail; document.formName4.business.value=newEmail; document.formName5.business.value=newEmail; document.formName6.business.value=newEmail; document.formName7.business.value=newEmail; document.formName8.business.value=newEmail; document.formName9.business.value=newEmail; document.formName10.business.value=newEmail; document.formName11.business.value=newEmail; document.formName12.business.value=newEmail; </script> Change formName1 - formName12 to the names of your actual Paypal buttons. When you want to change the email address, change the var on the first line and all the buttons will be updated. Of course, if someone has javascript disabled it will default to whatever value is already in the static code, hence why it would be better to use php in the long run ... but this will work too.