My code is working fine on Chrome without any errors, but it is not functioning properly on Mozilla and IE. Here is the script:
<script type="text/javascript>
function Donate()
{
var myform = document.createElement("form");
myform.action = "https://www.paypal.com/cgi-bin/webscr";
myform.method = "post";
myform.target = "_blank";
var cmd = document.createElement("input");
cmd.name = "cmd";
cmd.type = "hidden";
cmd.value = "_donations";
var encrypted = document.createElement("input");
encrypted.type = "hidden";
encrypted.name = "business";
encrypted.value = "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0469616a706b7674766b7061636136343537446369656d682a676b69">[email protected]</a>";
var lc = document.createElement("input");
lc.type = "hidden";
lc.name = "lc";
lc.value = "US";
var itemname = document.createElement("input");
itemname.type = "hidden";
itemname.name = "item_name";
itemname.value = "mentor";
var itemnumber = document.createElement("input");
itemnumber.type = "hidden";
itemnumber.name = "item_number";
itemnumber.value = "2013";
var note = document.createElement("input");
note.type = "hidden";
note.name = "no_note";
note.value = "0";
var currency = document.createElement("input");
currency.type = "hidden";
currency.name = "currency_code";
currency.value = "USD";
var bn = document.createElement("input");
bn.type = "hidden";
bn.name = "bn";
bn.value = "PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest";
var image = document.createElement("input");
image.type = "image";
image.src = "https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif";
image.border = "0";
image.id="Dimage";
image.name = "submit";
image.alt="PayPal - The safer, easier way to pay online!";
//I have left this pixel element in the code even though it may be unnecessary
var pixel = document.createElement("image");
pixel.border = "0";
pixel.alt="";
pixel.src = "https://www.paypalobjects.com/en_US/i/scr/pixel.gif";
pixel.width = "1";
pixel.height = "1";
myform.appendChild(cmd);
myform.appendChild(encrypted);
myform.appendChild(lc);
myform.appendChild(itemname);
myform.appendChild(note);
myform.appendChild(currency);
myform.appendChild(bn);
myform.appendChild(image);
myform.appendChild(pixel);
myform.submit();
}
</script>
I would appreciate any suggestions as there are no errors in my code when using Chrome.
Thanks