<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Pop [over] goes the weasel.</title>
	<link>http://ask.metafilter.com/44053/Pop-over-goes-the-weasel/</link>
	<description>Comments on Ask MetaFilter post Pop [over] goes the weasel.</description>
	<pubDate>Wed, 09 Aug 2006 14:44:33 -0800</pubDate>
	<lastBuildDate>Wed, 09 Aug 2006 14:44:33 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Pop [over] goes the weasel.</title>
		<link>http://ask.metafilter.com/44053/Pop-over-goes-the-weasel</link>	
		<description>How can I make nifty mini pop-up window boxes that appear within a window (a la Gmail)? &lt;br /&gt;&lt;br /&gt; I&apos;m looking for JavaScript examples or other guidance on how to make &quot;windows&quot; that appear on clicks or mouseovers on sites like Gmail, where it&apos;s not a separate window but rather a little box that is the top layer and covers whatever&apos;s underneath.  Anyone have experience with these?  I&apos;m having trouble figuring out the code snippets that create them...</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2006:site.44053</guid>
		<pubDate>Wed, 09 Aug 2006 14:37:28 -0800</pubDate>
		<dc:creator>EnormousTalkingOnion</dc:creator>
		
			<category>popup</category>
		
			<category>windows</category>
		
			<category>webdesign</category>
		
			<category>javascript</category>
		
	</item> <item>
		<title>By: The Radish</title>
		<link>http://ask.metafilter.com/44053/Pop-over-goes-the-weasel#675662</link>	
		<description>I think what you are looking for is a hidden DIV that appears on a certain action (such as mouse over). &lt;a href=&quot;http://www.technorealm.co.uk/scripts/mouseovershowtext.html&quot;&gt; Here&lt;/a&gt; is a good basic example of how it is done that should get you pointed in the right direction.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.44053-675662</guid>
		<pubDate>Wed, 09 Aug 2006 14:44:33 -0800</pubDate>
		<dc:creator>The Radish</dc:creator>
	</item><item>
		<title>By: letourneau</title>
		<link>http://ask.metafilter.com/44053/Pop-over-goes-the-weasel#675665</link>	
		<description>Probably your best bet is to find a kit/library that behaves the way you want. For instance, Yahoo&apos;s &lt;a href=&quot;http://developer.yahoo.com/yui/index.html&quot;&gt;UI library&lt;/a&gt; has a &lt;a href=&quot;http://developer.yahoo.com/yui/container/tooltip/index.html&quot;&gt;tooltip capability&lt;/a&gt;. Read the documentation on how to get it into your page.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.44053-675665</guid>
		<pubDate>Wed, 09 Aug 2006 14:47:50 -0800</pubDate>
		<dc:creator>letourneau</dc:creator>
	</item><item>
		<title>By: letourneau</title>
		<link>http://ask.metafilter.com/44053/Pop-over-goes-the-weasel#675680</link>	
		<description>Actually, re-reading your question, the &lt;a href=&quot;http://developer.yahoo.com/yui/container/dialog/index.html&quot;&gt;Dialog&lt;/a&gt; feature in the Yahoo UI library is probably what you&apos;re actually looking for: a modal &quot;window&quot; that partially covers your main page and can be used for displaying status messages or presenting options?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.44053-675680</guid>
		<pubDate>Wed, 09 Aug 2006 14:51:38 -0800</pubDate>
		<dc:creator>letourneau</dc:creator>
	</item><item>
		<title>By: grumblebee</title>
		<link>http://ask.metafilter.com/44053/Pop-over-goes-the-weasel#675703</link>	
		<description>Gmail&apos;s chat window -- at least if you press a little button -- is not a DIV. It&apos;s a separate window. You can close other browser windows and keep just it running on your desktop.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.44053-675703</guid>
		<pubDate>Wed, 09 Aug 2006 15:08:25 -0800</pubDate>
		<dc:creator>grumblebee</dc:creator>
	</item><item>
		<title>By: ook</title>
		<link>http://ask.metafilter.com/44053/Pop-over-goes-the-weasel#675720</link>	
		<description>You might also look into the &lt;a href=&quot;http://script.aculo.us&quot;&gt;scriptaculous&lt;/a&gt; library, which is pretty easy to use, and has lots of superfluous visual effects to play with.  (Look at Effect.Appear, Effect.Fade, for example.)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.44053-675720</guid>
		<pubDate>Wed, 09 Aug 2006 15:23:53 -0800</pubDate>
		<dc:creator>ook</dc:creator>
	</item><item>
		<title>By: Hildago</title>
		<link>http://ask.metafilter.com/44053/Pop-over-goes-the-weasel#675875</link>	
		<description>Now that I&apos;m finished, I&apos;m not 100% sure this is what you wanted, but I assumed you were asking about the little &quot;loading&quot; or &quot;saving&quot; boxes that pop up on Gmail to tell you what&apos;s going on in the background.  If so, &lt;a href=&quot;http://tailorstoday.com/storage/gmailtypebox.htm&quot;&gt;this&lt;/a&gt; is kinda like that.  I dunno, I&apos;m still learning javascript, so maybe it&apos;s totally weak.  Hope it works for you.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.44053-675875</guid>
		<pubDate>Wed, 09 Aug 2006 17:43:22 -0800</pubDate>
		<dc:creator>Hildago</dc:creator>
	</item><item>
		<title>By: Hildago</title>
		<link>http://ask.metafilter.com/44053/Pop-over-goes-the-weasel#675878</link>	
		<description>(And if it is, I&apos;m happy to explain anything that doesn&apos;t make sense)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.44053-675878</guid>
		<pubDate>Wed, 09 Aug 2006 17:45:25 -0800</pubDate>
		<dc:creator>Hildago</dc:creator>
	</item><item>
		<title>By: EnormousTalkingOnion</title>
		<link>http://ask.metafilter.com/44053/Pop-over-goes-the-weasel#676014</link>	
		<description>hey guys, good suggestions so far, the Yahoo UI library might be the ticket.  The kinds of boxes in Gmail I&apos;m thinking about are like the floating panels that show up to autocomplete e-mail addresses as you type them or the box that shows up when you mouseover someone on your Contacts list...</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.44053-676014</guid>
		<pubDate>Wed, 09 Aug 2006 20:21:29 -0800</pubDate>
		<dc:creator>EnormousTalkingOnion</dc:creator>
	</item><item>
		<title>By: grumblebee</title>
		<link>http://ask.metafilter.com/44053/Pop-over-goes-the-weasel#676096</link>	
		<description>Oh, those?&lt;br&gt;
&lt;br&gt;
Those are just DIVS.&lt;br&gt;
&lt;br&gt;
I hate figuring out how to write code in mefi, so I&apos;m using [ ] instead of angle brackets:&lt;br&gt;
&lt;br&gt;
In the HTML:&lt;br&gt;
&lt;br&gt;
[div id=&quot;popup&quot;]some content[/div]&lt;br&gt;
&lt;br&gt;
In the CSS (to make the div invisible by default):&lt;br&gt;
&lt;br&gt;
#popup&lt;br&gt;
{&lt;br&gt;
position:absolute;&lt;br&gt;
width:300px;&lt;br&gt;
height:200px;&lt;br&gt;
left:340;&lt;br&gt;
top:220;&lt;br&gt;
visibility:hidden; /* &lt; -- the key bit */br&gt;
}&lt;br&gt;
&lt;br&gt;
In the Javascript:&lt;br&gt;
&lt;br&gt;
var popup = document.getElementById(&quot;popup&quot;);&lt;br&gt;
popup.style.visibility = visible;&lt;br&gt;
&lt;br&gt;
In addition to this, you need to learn how to trigger that Javascript based on some event. This is the trickiest part in terms of cross-browser compatibility. There are various .js files floating around that can simplify it for you. Here&apos;s &lt;a href=&quot;http://www.dustindiaz.com/rock-solid-addevent/&quot;&gt;one&lt;/a&gt; that I&apos;ve used a few times.&lt;br&gt;
&lt;br&gt;
You paste that code (linked to above) into a file called, say, utils.js. Then, in the head of your html, add the following:&lt;br&gt;
&lt;br&gt;
[script type=&quot;text/javascript&quot; src=&quot;utils.js&quot;]&lt;br&gt;
[script type=&quot;text/javascript&quot; src=&quot;popup.js&quot;]&lt;br&gt;
&lt;br&gt;
The second is your script. Make sure it comes second, because it will use the code in utils.js -- so that file needs to load first.&lt;br&gt;
&lt;br&gt;
In popup.js, you can then call the addEvent() function. This isn&apos;t native to Javascript. It&apos;s defined in utils.js. But it allows you to set up trigger-based events that work in all modern browsers.&lt;br&gt;
&lt;br&gt;
In the html file, add an anchor tag like this:&lt;br&gt;
&lt;br&gt;
[a href=&quot;#&quot; id=&quot;trigger&quot;]click here[/a]&lt;br&gt;
&lt;br&gt;
In the javascript file, popup.js, type the following:&lt;br&gt;
&lt;br&gt;
//this runs the init function after the&lt;br&gt;
//browser window has loaded the whole page&lt;br&gt;
addEvent(window,&apos;load&apos;,init);&lt;br&gt;
&lt;br&gt;
function init()&lt;br&gt;
{&lt;br&gt;
//get the anchor tag&lt;br&gt;
var trigger = document.getElementById(&quot;trigger&quot;);&lt;br&gt;
&lt;br&gt;
//hook things up so that when someone&lt;br&gt;
//clicks the text &quot;click here&quot;, the div appears&lt;br&gt;
addEvent(trigger,&apos;mousedown&apos;,showPopup);&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
function showPopup()&lt;br&gt;
{&lt;br&gt;
//here&apos;s where the Javascript from above goes&lt;br&gt;
var popup = document.getElementById(&quot;popup&quot;);&lt;br&gt;
popup.style.visibility = visible;&lt;br&gt;
}&lt;/&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.44053-676096</guid>
		<pubDate>Wed, 09 Aug 2006 22:08:13 -0800</pubDate>
		<dc:creator>grumblebee</dc:creator>
	</item><item>
		<title>By: bkudria</title>
		<link>http://ask.metafilter.com/44053/Pop-over-goes-the-weasel#676480</link>	
		<description>You may also want to take a look at &lt;a href=&quot;http://codylindley.com/Webdev/274/thickbox-12&quot;&gt;Thickbox&lt;/a&gt;.  it&apos;s much lighter than YUI, and it&apos;s drop-in-and-go.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.44053-676480</guid>
		<pubDate>Thu, 10 Aug 2006 08:40:07 -0800</pubDate>
		<dc:creator>bkudria</dc:creator>
	</item>
	</channel>
</rss>
