#23 Have LicenseChooser.js support being embedded inside a form


LicenseChooser.js does not work properly in many browsers (Safari, Firefox, Opera) if the script tag that includes it is placed inside an html form. The problem seems to be that the script includes an html fragment that contains a form element (with id cc_js_cc_js_result_storage). Internet Explorer seems to be able to handle a form within a form, but other browsers fail in some manner.

In this patch the javascript that includes the html fragment searches up the DOM element tree to see if the script tag is contained within a form or not. If the script tag is within a form then the cc_js_cc_js_result_storage element is converted from a <form> element to a <p> element before the html is added to the DOM. If the script tag is not within a form then the existing template.html is used.


  • John Horigan

    John Horigan - 2009-04-18

    patch for append_ourselves.js and template.html

  • John Horigan

    John Horigan - 2009-04-21

    I forgot to mention that the patch also changes the outmost contain element from a <span> to a <div>. I made this change because the W3C HTML Validator complained that block-level elements are not allowed inside of inline elements.

  • John Horigan

    John Horigan - 2009-05-01

    This patch has been accepted for the next version after 0.96.

  • John Horigan

    John Horigan - 2009-05-01
    • status: open --> closed-accepted

Log in to post a comment.