Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery Colorbox, open from input field, return value back
    text
    copied!<p>i try to fill/overwrite(if exists) an input field from an colorbox popup search form, but i dont get the variable back into my input field.</p> <p>this is the mainpage:</p> <pre><code>link rel="stylesheet" href="jquery/css/ui-darkness/jquery-ui-1.10.1.custom.css"&gt; &lt;script src="jquery/js/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script src="jquery/js/jquery-ui-1.10.1.custom.js"&gt;&lt;/script&gt; &lt;script src="jquery/colorbox/jquery.colorbox-min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="jquery/colorbox/colorbox.css" /&gt; &lt;script&gt; $(function() { var kid = $('#Kontaktname').val(); $("#Kontaktname").colorbox({ href:"contact_search_popup.php?s_contacts_id=" + kid, iframe:true, innerWidth:850, innerHeight:400, opacity:0.1, overlayClose:false, }); }); &lt;/script&gt; &lt;p&gt;&lt;input type="text" id="Kontaktname" value="1001" name="Kontaktname"&gt;&lt;/p&gt; &lt;p id="test"&gt; return value: &lt;/p&gt; </code></pre> <p>this is colorbox popup page:</p> <pre><code>link rel="stylesheet" href="jquery/css/ui-darkness/jquery-ui-1.10.1.custom.css"&gt; &lt;script src="jquery/js/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script src="jquery/js/jquery-ui-1.10.1.custom.js"&gt;&lt;/script&gt; &lt;script src="jquery/colorbox/jquery.colorbox-min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="jquery/colorbox/colorbox.css" /&gt; &lt;input type="submit" id="formSubmit" class="test" value="{Label1}" name="formSubmit"&gt; &lt;script&gt; $(document).ready(function() { $("input.test").click(function() { window.parent.$("#kontaktname").text($(this).val()); // works window.parent.$("#test").text($(this).val()); // dont work !!! parent.$.colorbox.close(); }); }); &lt;/script&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload