Support » Plugin: Easy FancyBox » Easy FancyBox getElementById

  • gsxrgeek



    function unsplitCookie() {
      var default_roiz = getCookie("__roiz");
        if (default_roiz != null && default_roiz != "undefined") {
            document.getElementById("formROIVisitor").value = default_roiz;
            //alert(default_roiz); alert works but nothing populates in the value of the input

    HTML of Form inside fancybox
    <div style=”display:none” class=”fancybox-hidden”>
    <div id=”fancyboxID-1″>`
    <form class=”mkto” action=””>
    <input type=”text” name=”formROIVisitor” id=”formROIVisitor” value=”” />
    <button type=”submit”>Submit</button>

    <a href=”#fancyboxID-1″ class=”fancybox-inline”>Request a Info Kit.</a>`

    I get a JavaScript error using FF.
    Error: TypeError: document.getElementById(…) is null
    Source File: chrome://web-developer/content/overlay/javascript/overlay.js
    Line: 7333

    When I pull the form outside of the fancy box everything works as expected. Not sure why the document.getElementById is not passing. Any suggestions would be great!

Viewing 1 replies (of 1 total)
  • Plugin Author RavanH


    Does this form + script combo work without Fancybox?

Viewing 1 replies (of 1 total)
  • The topic ‘Easy FancyBox getElementById’ is closed to new replies.