snipt

Ctrl+h for KB shortcuts

JavaScript

close popup refresh parent page on javascript

1
2
3
4
5
// © 2012-2013, [ Abstract Codify ] Abstractcodify.com All Rights Reserved.
window.onunload = refreshParent;
function refreshParent() {
    window.opener.location.reload();
}
https://snipt.net/embed/ee29b801e79158c1d9d10ccfe792e351/
https://snipt.net/raw/ee29b801e79158c1d9d10ccfe792e351/
ee29b801e79158c1d9d10ccfe792e351
js
JavaScript
5
2016-09-24T18:31:50
True
False
True
Jun 26, 2013 at 10:07 PM
/api/public/snipt/65807/
close-popup-refresh-parent-page-on-javascript
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c1">// © 2012-2013, [ Abstract Codify ] Abstractcodify.com All Rights Reserved.</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">window</span><span class="p">.</span><span class="nx">onunload</span> <span class="o">=</span> <span class="nx">refreshParent</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a><span class="kd">function</span> <span class="nx">refreshParent</span><span class="p">()</span> <span class="p">{</span> </span><span id="L-4"><a name="L-4"></a> <span class="nb">window</span><span class="p">.</span><span class="nx">opener</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">reload</span><span class="p">();</span> </span><span id="L-5"><a name="L-5"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
javascript, window

JavaScript

Window open (popup) setting page

// © 2012-2013, [ Abstract Codify ] Abstractcodify.com All Rights Reserved.
set_open = window.open($(this).attr('href'),'popup','directories=no,titlebar=no,toolbar=no,location=on,status=no,menubar=no,scrollbars=yes,resizable=no,width=820,height=620');
https://snipt.net/embed/a8aad727fa94b15d3d3fe9e468a3a943/
https://snipt.net/raw/a8aad727fa94b15d3d3fe9e468a3a943/
a8aad727fa94b15d3d3fe9e468a3a943
js
JavaScript
2
2016-09-24T18:32:00
True
False
True
Jun 26, 2013 at 09:29 AM
/api/public/snipt/65728/
window-open-setting
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c1">// © 2012-2013, [ Abstract Codify ] Abstractcodify.com All Rights Reserved.</span> </span><span id="L-2"><a name="L-2"></a><span class="nx">set_open</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">open</span><span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">attr</span><span class="p">(</span><span class="s1">&#39;href&#39;</span><span class="p">),</span><span class="s1">&#39;popup&#39;</span><span class="p">,</span><span class="s1">&#39;directories=no,titlebar=no,toolbar=no,location=on,status=no,menubar=no,scrollbars=yes,resizable=no,width=820,height=620&#39;</span><span class="p">);</span> </span></pre></div> </td></tr></table>
javascript, window

JavaScript

SlimTimmer - Open Timer to the top right

javascript:newwindow=window.open('http://slimtimer.com/client/','slimtimer','resizable=1,toolbar=0,location=0,status=1,menubar=0,scrollbars=1,width=175,height=700,left=2400,top=20');newwindow.focus();
https://snipt.net/embed/4424f42ed6e1f81508f5693959d37003/
https://snipt.net/raw/4424f42ed6e1f81508f5693959d37003/
4424f42ed6e1f81508f5693959d37003
js
JavaScript
1
2016-09-22T00:48:18
True
False
False
May 14, 2013 at 10:23 AM
/api/public/snipt/61299/
slimtimmer-open-timer-to-the-top-right
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nx">javascript</span><span class="o">:</span><span class="nx">newwindow</span><span class="o">=</span><span class="nb">window</span><span class="p">.</span><span class="nx">open</span><span class="p">(</span><span class="s1">&#39;http://slimtimer.com/client/&#39;</span><span class="p">,</span><span class="s1">&#39;slimtimer&#39;</span><span class="p">,</span><span class="s1">&#39;resizable=1,toolbar=0,location=0,status=1,menubar=0,scrollbars=1,width=175,height=700,left=2400,top=20&#39;</span><span class="p">);</span><span class="nx">newwindow</span><span class="p">.</span><span class="nx">focus</span><span class="p">();</span> </span></pre></div> </td></tr></table>
"time tracking", "work tool", bunny, open, position, slimtimer, timer, window

Text only

Child Window Calls Parent Function

window.opener.ParentWindowFunction();
https://snipt.net/embed/f588fe5461dad6a1045f1e98911368b0/
https://snipt.net/raw/f588fe5461dad6a1045f1e98911368b0/
f588fe5461dad6a1045f1e98911368b0
text
Text only
1
2016-09-22T09:32:27
True
False
False
/api/public/snipt/41147/
child-window-calls-parent-function
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>window.opener.ParentWindowFunction(); </span></pre></div> </td></tr></table>
child, function, javascript, parent, window
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.