Support » Fixing WordPress » Input type=image

  • Resolved jdlejeune


    Hello. I’m attempting to insert a Paypal button and it keeps stripping out the src= for my <input type=image> tag. Anyone else experiencing this or know how to correct it?

    Many thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Insert in a post?

    Try turning off the visual editor (wywsiwig)?

    Thanks so much Yosemite. I disabled the tinyMCE under the admin profile and then uploaded the Xinha4WP plugin. It works like a charm 😀


    Welcome! Please mark this resolved, them?

    Yes, this is resolved. Do I need to mark it resolved?

    Yup..Wouldn’t hurt. This way, everyone will know, that this problem has been taken care of. 😉 =) And, it also helps “us” mods know what/where useful threads are, for certain problems and fixes for those problems. =) 😉


    here’s another workaround so the button can work with TinyMCE, but i admit it’s a bit insane. i should make a plugin out of it if anyone thinks it’s worth it.

    prerequisites: be willing and able to edit your header.php file and insert some scripts into the head section. be willing and able to upload the prototype library to your site.

    ok, here goes:

    1) create your button in paypal and copy their form code and paste it into the HTML editor for TinyMCE.

    2) find the line that has something like:

    3) change the ‘src’ part to ‘class’. yes, this is strange but you’ll see. it will work.

    4) click ‘Update’ so the thing is saved.

    5) download prototype.js from wherever (just google it) and upload it to /js/ (which means a js directory right off the root of your site)

    6) insert the following code into the <head> section of header.php within your theme directory:

    <script type=”text/javascript” src=”/js/prototype.js”></script>
    <script type=”text/javascript”>
    window.onload = function () {
    var inputs = document.getElementsByTagName(‘input’);
    function (input) {
    if (input.type==’image’) { input.src=input.className;Element.setStyle(input, {margin:0,padding:0,border:0,background:’transparent’}); }
    }; //end window.onload

    That should be it. There’s a preview of this working at

    I don’t claim that this won’t screw up other plugins. This code is going to operate on ANY input image within your blog without discretion.

    So, make sure you back up everything you touch before you do it. Lots of luck to all. Let me know if this was useful and if there’s enough interest I’ll see about putting a plugin together and making the code a little more discriminate so it only touches paypal buttons.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Input type=image’ is closed to new replies.