<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Pragmatic Forums | Posts in topic 'Pop Up Links'</title>
    <link>/forums/150/topics/4788.rss</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <item>
      <title>Pop Up Links posted by Allen Edward @ Mon, 16 Jan 2012 09:29:37 +0000</title>
      <description>&lt;p&gt;Seems interesting. Let me also try this one.&lt;/p&gt;</description>
      <pubDate>Mon, 16 Jan 2012 09:29:37 +0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:150:4788:28344</guid>
      <author>Allen Edward</author>
      <link>http://forums.pragprog.com/forums/150/topics/4788</link>
    </item>
    <item>
      <title>Pop Up Links posted by bob phil @ Tue, 15 Nov 2011 18:19:53 +0000</title>
      <description>&lt;p&gt;thanks, it helped a lot..&lt;/p&gt;</description>
      <pubDate>Tue, 22 Nov 2011 01:41:46 +0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:150:4788:27233</guid>
      <author>bob phil</author>
      <link>http://forums.pragprog.com/forums/150/topics/4788</link>
    </item>
    <item>
      <title>Pop Up Links posted by ben Reinhart @ Wed, 14 Jul 2010 00:04:35 +0000</title>
      <description>&lt;p&gt;Alright, thanks a lot for the help!&lt;/p&gt;</description>
      <pubDate>Wed, 14 Jul 2010 00:04:35 +0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:150:4788:16885</guid>
      <author>ben Reinhart</author>
      <link>http://forums.pragprog.com/forums/150/topics/4788</link>
    </item>
    <item>
      <title>Pop Up Links posted by Brian P. Hogan @ Tue, 13 Jul 2010 23:59:03 +0000</title>
      <description>&lt;p&gt;Ok, that&amp;#8217;s interesting to know. But feel free to grab the code from the book&amp;#8217;s web site. That contains the complete code for each of the examples. So, if you get stuck on anything else, you&amp;#8217;ll at least have something more to look at.&lt;/p&gt;</description>
      <pubDate>Tue, 13 Jul 2010 23:59:03 +0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:150:4788:16884</guid>
      <author>Brian P. Hogan</author>
      <link>http://forums.pragprog.com/forums/150/topics/4788</link>
    </item>
    <item>
      <title>Pop Up Links posted by ben Reinhart @ Tue, 13 Jul 2010 23:54:41 +0000</title>
      <description>&lt;p&gt;Thanks a lot for your response, and like I said, I apologize for wasting your time with a very simple question. But then I guess I&amp;#8217;ll point out to you that (since I did click on the grey link) the download code link on page 35 does not have that extra &lt;code&gt;$(function(){&lt;/code&gt;  tag.&lt;/p&gt;


	&lt;p&gt;Looking at page 40 though, it does.&lt;/p&gt;


	&lt;p&gt;Sorry to waste your time on that easy one!&lt;/p&gt;</description>
      <pubDate>Tue, 13 Jul 2010 23:55:31 +0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:150:4788:16883</guid>
      <author>ben Reinhart</author>
      <link>http://forums.pragprog.com/forums/150/topics/4788</link>
    </item>
    <item>
      <title>Pop Up Links posted by Brian P. Hogan @ Tue, 13 Jul 2010 23:49:49 +0000</title>
      <description>&lt;p&gt;You need to put your code in a document.ready event handler or move the JS code &lt;span class="caps"&gt;OUT&lt;/span&gt; of the header and put the script block &lt;span class="caps"&gt;AFTER&lt;/span&gt; the actual links. Since the links haven&amp;#8217;t been rendered yet, the script doesn&amp;#8217;t &amp;#8220;see&amp;#8221; them.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m sorry if that wasn&amp;#8217;t clear &amp;#8211; I&amp;#8217;ll review the chapter and make sure it is. But also look at the code. If you have the pdf, you can click the grey header on the code and bring up the actual source file.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  &amp;lt;script&amp;gt;
  $(function(){
     &amp;lt;script type="text/javascript"&amp;gt;
    // Display Links in New Window
    var links = $("a.popup");

    links.click(function(event) {
        event.preventDefault();
        window.open($(this).attr('href'));
    });
  });
  &amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;I hope that helps. Thanks for reading!&lt;/p&gt;</description>
      <pubDate>Tue, 13 Jul 2010 23:50:26 +0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:150:4788:16882</guid>
      <author>Brian P. Hogan</author>
      <link>http://forums.pragprog.com/forums/150/topics/4788</link>
    </item>
    <item>
      <title>Pop Up Links posted by ben Reinhart @ Tue, 13 Jul 2010 23:37:08 +0000</title>
      <description>&lt;p&gt;I apologize for posting this because I&amp;#8217;m sure this is something really dumb and simple, but I can&amp;#8217;t seem to get the javascript code for the pop up links working. I&amp;#8217;ve tried on Safari 5 and FireFox 3.5.10. Here is my code:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
&amp;lt;!DOCTYPE HTML&amp;gt;

&amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
&amp;lt;head&amp;gt;

  &amp;lt;meta http-equiv="content-type" content="text/html;charset=UTF-8" /&amp;gt;
  &amp;lt;title&amp;gt;Reflective Interiors, LLC&amp;lt;/title&amp;gt;

  &amp;lt;link href="style.css" media="screen" rel="stylesheet" type="text/css" /&amp;gt;

  &amp;lt;script type="text/javascript" src="jquery.js"&amp;gt;&amp;lt;/script&amp;gt;

  &amp;lt;script type="text/javascript"&amp;gt;
    // Display Links in New Window
    var links = $("a.popup");

    links.click(function(event) {
        event.preventDefault();
        window.open($(this).attr('href'));
    });
  &amp;lt;/script&amp;gt;

&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

  &amp;lt;a href="index.html" class="popup"&amp;gt;Index&amp;lt;/html&amp;gt;

&amp;lt;/body&amp;gt;    
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;There is no pop up, it just works like a regular link. I&amp;#8217;m taken to the new page but in the same window.

	&lt;p&gt;Also, if it helps, I could not even get the old example of how not to do it (with onclick) to work.&lt;/p&gt;


	&lt;p&gt;I tried so many different things. Adding jquery, removing jquery (v1.4.2 btw) removing &amp;#8216;type=&amp;#8221;text/javascript&amp;#8221;&amp;#8217; from the script tags.&lt;/p&gt;


	&lt;p&gt;I also tried putting script tags around the html link in the body.&lt;/p&gt;


	&lt;p&gt;As you can tell, I&amp;#8217;m not javascript expert :(&lt;/p&gt;</description>
      <pubDate>Tue, 13 Jul 2010 23:50:21 +0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:150:4788:16881</guid>
      <author>ben Reinhart</author>
      <link>http://forums.pragprog.com/forums/150/topics/4788</link>
    </item>
  </channel>
</rss>
