Note that there are some explanatory texts on larger screens.

plurals
  1. POCreate window popup with custom content instead of url?
    primarykey
    data
    text
    <p>Any one let me give an idea of implementing the window popup and accessing the <code>js</code> variable of parent window to popup window with custom content.</p> <pre><code>&lt;div id="modeltext" style="display:none"&gt; &lt;p id="linker" &gt;&lt;/p&gt; &lt;script type="text/javascript"&gt; var news = "http://google.com"; jQuery(document).ready(function() { jQuery('#linker').html("&lt;a href="+news+"&gt;"+news+"&lt;/a&gt;"); }); &lt;/script&gt; This is for testing according to the concept. &lt;/div&gt; &lt;a href="#" id="testing" &gt;Open a popup window&lt;/a&gt; </code></pre> <p><strong>JS:</strong></p> <pre><code>jQuery('#testing').click(function() { var w = window.open($('', "", "width=600, height=400, scrollbars=yes")); alert(news); var $w = $(w.document.body); $w.html($('#modelText').html()); }); </code></pre> <p>For example:</p> <p>Let consider i have set of set of paragraph and simple html form. If some one click the link from the parent like <code>(Open in New Window)</code>. Instead of url, i want to load the custom content and also i can't able to access the js variable value to the popup window. Not sure any suggestion would be great. I try to provide the js fiddle but the popup is not working. Is there is a way to show the custom content to the popup instead of url and using the js variable from main window to the popup window ?(How to get the window popup load in the parent window). Fiddle not working But here is the code <a href="http://jsfiddle.net/6cpup/11/" rel="nofollow">http://jsfiddle.net/6cpup/11/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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