{"id":3198,"date":"2012-05-28T08:40:15","date_gmt":"2012-05-28T08:40:15","guid":{"rendered":"http:\/\/2slick.com\/web\/?p=3198"},"modified":"2012-05-28T21:17:41","modified_gmt":"2012-05-28T21:17:41","slug":"popup-on-click","status":"publish","type":"post","link":"https:\/\/2slick.com\/web\/popup-on-click\/affordablewebsitestips\/tutorials","title":{"rendered":"Popup On Click"},"content":{"rendered":"<p>Here's a simple JavaScript code snippet that will allow you to make a specified URL popup in a new window when a link is clicked. A popup script can be used for newsletter wignup \u00a0squeeze pages, product advertisements and more.<\/p>\n<p><a onclick=\"javascript:void window.open('http:\/\/google.com','1338194497982','width=700,height=500,toolbar=0,menubar=0,location=0,status=0,scrollbars=0,resizable=1,left=0,top=0');return false;\" href=\"http:\/\/google.com\">Popup On Click Window Sample<\/a><\/p>\n<h3>How to make a popup on click link<\/h3>\n<p>Enter the code snippet below into any HTML document. You can also enter this code snippet into any WordPress Widget, Page or Post. If you insert this code snippet into a WordPress page or post, be sure that you're in HTML tab mode.<br \/>\n<a href=\"http:\/\/2slick.com\/web\/wp-content\/uploads\/2012\/01\/html_tab_wordpress.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1532\" style=\"border: 1px solid black;\" title=\"html_tab_wordpress\" src=\"http:\/\/2slick.com\/web\/wp-content\/uploads\/2012\/01\/html_tab_wordpress.jpg\" alt=\"\" width=\"600\" height=\"600\" srcset=\"https:\/\/2slick.com\/web\/wp-content\/uploads\/2012\/01\/html_tab_wordpress.jpg 600w, https:\/\/2slick.com\/web\/wp-content\/uploads\/2012\/01\/html_tab_wordpress-150x150.jpg 150w, https:\/\/2slick.com\/web\/wp-content\/uploads\/2012\/01\/html_tab_wordpress-300x300.jpg 300w, https:\/\/2slick.com\/web\/wp-content\/uploads\/2012\/01\/html_tab_wordpress-36x36.jpg 36w, https:\/\/2slick.com\/web\/wp-content\/uploads\/2012\/01\/html_tab_wordpress-90x90.jpg 90w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>Popup on click, code snippet<\/h3>\n<p><!--DEVFMTCODE--><pre class=\"devcodeblock\" title=\"Javascript\"><table class=\"devcodetools\"><tbody><tr><td>&nbsp;Javascript&nbsp;|&nbsp;<\/td><td style=\"background-image:url('https:\/\/2slick.com\/web\/wp-content\/plugins\/devformatter\/img\/devformatter-copy.png');background-repeat:no-repeat;background-position:50% 50%;width:16px;height:16px;\"\/><embed id=\"ZeroClipboard1\" src=\"https:\/\/2slick.com\/web\/wp-content\/plugins\/devformatter\/_zclipboard.swf\" loop=\"false\" menu=\"false\" quality=\"best\" bgcolor=\"#ffffff\" width=\"16px\" height=\"16px\" align=\"middle\" allowScriptAccess=\"always\" allowFullScreen=\"false\" type=\"application\/x-shockwave-flash\" pluginspage=\"http:\/\/www.macromedia.com\/go\/getflashplayer\" flashvars=\"id=1&width=16&height=16\" wmode=\"transparent\" \/><\/td><td>&nbsp;copy&nbsp;code&nbsp;|<\/td><td style=\"cursor:pointer\" title=\"DevFormatter Plugin\" onclick=\"devfmt_credits()\">?<\/td><td width=\"99%\">&nbsp;<\/td><\/tr><\/tbody><\/table><div class=\"devcodeoverflow\"><table class=\"devcodearea\" width=\"100%\"><tr><td class=\"devcodelines\" width=\"1%\">1<\/td><td class=\"devcodelinesarea\"><pre class=\"devcode devcodeline\"><span style=\"color: #339933;\">&lt;<\/span>a onclick<span style=\"color: #339933;\">=<\/span><span style=\"color: #3366CC;\">&quot;javascript:void window.open('http:\/\/google.com','1338194497982','width=700,height=500,toolbar=0,menubar=0,location=0,status=0,scrollbars=0,resizable=1,left=0,top=0');return false;&quot;<\/span> href<span style=\"color: #339933;\">=<\/span><span style=\"color: #3366CC;\">&quot;http:\/\/google.com&quot;<\/span><span style=\"color: #339933;\">&gt;<\/span>Pop<span style=\"color: #339933;\">-<\/span>up Window<span style=\"color: #339933;\">&lt;\/<\/span>a<span style=\"color: #339933;\">&gt;<\/span><\/pre><\/td><\/tr><\/table><\/div><\/pre><!--END_DEVFMTCODE--><br \/>\nRight now, this popup window code brings you to <a href=\"http:\/\/google.com\">Google.com<\/a>. You can specify the URL that will appear in the popup window by changing the URL that appears in two places (http:\/\/google.com) in the code snippet.<br \/>\nYou can also change the dimensions of the popup on click window by changing the height and width variables in the code snippet.<\/p>\n<p><strong>Note:<\/strong> Some users have their browsers set not to allow popup on click windows. If a browser isn't set to allow popup windows, your popup code won't function.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a simple JavaScript code snippet that will allow you to make a specified URL popup in a new window when a link is clicked. A popup script can be used for newsletter wignup \u00a0squeeze pages, product advertisements and more. Popup On Click Window Sample How to make a popup on click link Enter the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3207,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,4,6],"tags":[396],"class_list":["post-3198","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-affordablewebsitestips","category-tutorials","category-wordpress","tag-popup-window"],"_links":{"self":[{"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/posts\/3198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/comments?post=3198"}],"version-history":[{"count":11,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/posts\/3198\/revisions"}],"predecessor-version":[{"id":3200,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/posts\/3198\/revisions\/3200"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/media\/3207"}],"wp:attachment":[{"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/media?parent=3198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/categories?post=3198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/tags?post=3198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}