<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>20bits - Latest Comments in Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.disqus.com/</link><description></description><language>en</language><lastBuildDate>Mon, 31 Mar 2008 14:58:37 -0000</lastBuildDate><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793340</link><description>Hey everyone,&lt;br&gt;&lt;br&gt;The problem is that in Prototype 1.6 the hash object is no longer API-compatible with an Object.  That means you can't pass in a Prototype Hash where an Object was expected.  To remedy this there is no a toObject() method.&lt;br&gt;&lt;br&gt;I'll post a fix with documentation and the like, but for now you can fix it by adding ".toObject()" after ".merge(args)".&lt;br&gt;&lt;br&gt;The call to Ajax.Updater should now be &amp;lt;pre&amp;gt;&lt;br&gt;new Ajax.Updater(pane, tabs[Event.element(e).id], $H({&lt;br&gt;					asynchronous: true, &lt;br&gt;					method: 'get'&lt;br&gt;				}).merge(args).toObject());&amp;lt;/pre&amp;gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jesse</dc:creator><pubDate>Mon, 31 Mar 2008 14:58:37 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793339</link><description>I think this is the problem for those using Prototype 1.6+:&lt;br&gt;&lt;a href="http://www.prototypejs.org/api/hash/merge" rel="nofollow"&gt;http://www.prototypejs.org/api/hash/merge&lt;/a&gt;&lt;br&gt;&lt;br&gt;Will post a solution if I find one. Feel free to beat me to it. :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Darryl</dc:creator><pubDate>Mon, 31 Mar 2008 14:06:55 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793338</link><description>Ok, fixed my problem. I think it should be stressed that it's very important where you declare your TabbedPane's. It must be *after* the tab section has been laid out, otherwise the Prototype model will complain because the elements being passed in don't exist yet.&lt;br&gt;&lt;br&gt;I moved my TabbedPane block to the end of the page just before the  tag and it worked fine. Now that I think about it, it makes perfect sense. :)&lt;br&gt;&lt;br&gt;Now that that's fixed, I'm also experiencing the problem with the overlap pane not being hidden. :(</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Darryl</dc:creator><pubDate>Mon, 31 Mar 2008 13:44:23 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793337</link><description>Same problem as Dylan MacDonald for me. Doesn't work for Prototype 1.6. Firebug tells me: "element has no properties [Break on this error] if (element._eventID) return element._eventID;"&lt;br&gt;&lt;br&gt;Can't make head or tails of why. Pity, I kinda liked this solution.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Darryl</dc:creator><pubDate>Mon, 31 Mar 2008 11:19:16 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793319</link><description>Yeah if you could get this working for the current version of prototype, that would be helpful.  All I get now is the loading message...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dylan MacDonald</dc:creator><pubDate>Fri, 28 Mar 2008 17:13:40 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793331</link><description>um,&lt;br&gt;&lt;br&gt;I'm open to all advice.  Do you have any, or are you just complaining miscellaneously?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jesse</dc:creator><pubDate>Wed, 26 Mar 2008 14:18:13 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793330</link><description>Nice! Very simple and a great starter. Thanks for taking the time to write it up, post it on your site and answer questions.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcus</dc:creator><pubDate>Wed, 26 Mar 2008 14:14:00 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793329</link><description>Please Jesse, this is some neat code but you need to do a better job presenting it for download and use.  Take some pointers from other sites and try to make your website more usable.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">um</dc:creator><pubDate>Tue, 25 Mar 2008 16:23:00 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793326</link><description>Jesse... really great tabs...for some reason the onSuccess hide won't work for the loading icon. It never goes away. I noticed someone had to revert to an old version of Prototype for this to work... do you know of any fixes for the current version?&lt;br&gt;Thanks!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">EdCroft</dc:creator><pubDate>Tue, 11 Mar 2008 15:41:45 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793324</link><description>Thanks for taking the time to help us out Jesse - I'm sure that is what I had done, but obviously I hadn't - it works fine now.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jez</dc:creator><pubDate>Fri, 29 Feb 2008 14:51:48 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793323</link><description>Jez,&lt;br&gt;&lt;br&gt;Like so:&lt;br&gt;&amp;lt;pre&amp;gt;new TabbedPane('MyPane', &lt;br&gt;	{&lt;br&gt;		'pane1': '/downloads/pane1.html',&lt;br&gt;		'pane2': '/downloads/pane2.html'&lt;br&gt;	},&lt;br&gt;	{&lt;br&gt;		onClick: function(e) {&lt;br&gt;			$('MyPane_overlay').show();&lt;br&gt;		},&lt;br&gt;		onSuccess: function(e) {&lt;br&gt;			$('MyPane_overlay').hide();&lt;br&gt;		},&lt;br&gt;		evalScripts: true&lt;br&gt;	});&amp;lt;/pre&amp;gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jesse</dc:creator><pubDate>Fri, 29 Feb 2008 00:42:11 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793322</link><description>Hi Jesse.&lt;br&gt;&lt;br&gt;&lt;br&gt;"You can just set the appropriate fields in the args parameter" - I'm new to this and can't do this successfully, whereas including it the script just works.&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;&lt;br&gt;Jez</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jez</dc:creator><pubDate>Thu, 28 Feb 2008 05:25:01 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793318</link><description>Jez,&lt;br&gt;&lt;br&gt;You shouldn't need to muck with the script itself.  You can just set the appropriate fields in the &amp;lt;tt&amp;gt;args&amp;lt;/tt&amp;gt; parameter &amp;mdash; it's passed through to the Updater.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jesse</dc:creator><pubDate>Wed, 27 Feb 2008 18:48:30 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793327</link><description>OK, after a bit of digging I found out I had to include evalScript:true in the Ajax.Updater, and it's now working a treat. Thanks again for making this available Jesse.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jez</dc:creator><pubDate>Wed, 27 Feb 2008 18:02:23 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793317</link><description>Thanks for this Jesse. I just have a quick question though - I am trying to include Flash content within the panes using SWFObject, but this is not working - as far as I understand this is due to Prototype not rendering JavaScript. Can anyone tell me if this is correct or not, and if so, if there is any work around?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jez</dc:creator><pubDate>Tue, 26 Feb 2008 19:46:11 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793320</link><description>Solved it. I was using the newest version of prototype. So after I reverted it worked fine. I suppose if I had the time I could make it work with the new version. But...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Darren</dc:creator><pubDate>Thu, 21 Feb 2008 15:36:01 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793321</link><description>I am having trouble with the onSuccess event as well -- just not getting called. I am including the js files prototype and effects.  I have tested on Win and Linux, as well as multiple browsers. Any help would be greatly appreciated.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Darren</dc:creator><pubDate>Thu, 21 Feb 2008 15:06:38 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793333</link><description>hi, this is pretty cool! I was inspired by this to make one of my own - &lt;a href="http://aesthetic-design.co.uk/tabs/" rel="nofollow"&gt;here&lt;/a&gt; i used scriptaculous for mine though, to give me cool effects!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Kent</dc:creator><pubDate>Sun, 10 Feb 2008 11:28:19 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793325</link><description>this is the style used here&lt;br&gt;&lt;br&gt;.tabbed-pane * {margin: 0;padding: 0;}&lt;br&gt;.tabbed-pane {width: 500px;}&lt;br&gt;.tabbed-pane .tabs {list-style: none;clear: both;float: left;margin-bottom: -1px;}&lt;br&gt;.tabbed-pane .tabs .active {background: white;border-bottom: 1px solid white;}&lt;br&gt;.tabbed-pane .tabs li {float: left;margin: 0 3px 0 0;}&lt;br&gt;.tabbed-pane .tabs li a {color: #336699;display: block;padding: 5px;background: #f0f0f0;border-color: #333;border-style: solid;border-width: 1px;}&lt;br&gt;.tabbed-pane .pane {border: 1px solid #333;padding: 5px;clear: both;height: 100%;}&lt;br&gt;.tabbed-container {position: relative;clear: both;min-height: 10em;}&lt;br&gt;.tabbed-container .overlay {position: absolute;clear: both;border: 1px solid #333;padding: 5px;width: 488px;top: 0;left: 0;background: white url(/include/images/spinner.gif) center center no-repeat;text-align: center;z-index: 100;height: 100%;}</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rakesh</dc:creator><pubDate>Fri, 08 Feb 2008 00:45:48 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793334</link><description>Hi,&lt;br&gt;&lt;br&gt;Nice work Jesse!&lt;br&gt;&lt;br&gt;I'm trying to load some php code into one of the tabs, but it seems like it doesn't support using code in the external file? Can anyone help?&lt;br&gt;&lt;br&gt;Thanks...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomsen</dc:creator><pubDate>Fri, 25 Jan 2008 15:49:21 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793332</link><description>Hi, &lt;br&gt;&lt;br&gt;This looks very nice, however I seem to have a problem loading a page when I click a tab link .&lt;br&gt;the path is correct, and it links to a standard html page, however when I click the tab, it just tries to load but it never does. &lt;br&gt;So I went to the "activities" window in Safari, to see what has been loaded and it shows that it is trying to load the page. But right next to the file name it says "method not allowed". &lt;br&gt;&lt;br&gt;Any idea what is causing this? &lt;br&gt;&lt;br&gt;im just running a test page at the moment, so there is no special scripting or html or anything in the page.&lt;br&gt;&lt;br&gt;Thanks,</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Randy</dc:creator><pubDate>Sun, 13 Jan 2008 23:41:07 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793335</link><description>Greg,&lt;br&gt;&lt;br&gt;This system requires at least the prototype.js library.  Are you loading both prototype and scriptaculous?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jesse</dc:creator><pubDate>Fri, 28 Dec 2007 13:30:57 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793328</link><description>I'm having a little trouble making this tab system work. I am currently just running it from a local Apache installation that I use for testing. Obviously I tried to make a lot of adjustments up front, but when it appeared that the onSuccess call was never firing, I back-tracked.&lt;br&gt;&lt;br&gt;I copied the necessary styles from the external style sheet. I copied the code in TabbedPane.js to an empty JS file I was using for testing. I copied the source code from  to it's closing div tag. And I downloaded pane1.html and pane2.html.&lt;br&gt;&lt;br&gt;Everything appears to load correctly. But when I click on a tab, the activity indicator, "MyPane_overlay", is not hidden. I placed an alert before the hide function is called, but the alert is never executed. Any ideas why this might fail? Thanks</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Greg</dc:creator><pubDate>Tue, 25 Dec 2007 21:24:18 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793336</link><description>Jesse, thanks for a great tutorial. Very helpful. I've previously used jQuery, but think Prototype is best for this.&lt;br&gt;&lt;br&gt;One question I did have was is it possible to use a Rollover behaviour on the tabs? I want to make the pages load when someone rolls over a tab rather than click.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Richard</dc:creator><pubDate>Tue, 18 Dec 2007 10:15:44 -0000</pubDate></item><item><title>Re: Dynamic Ajax Tabs in 20 Lines | 20bits</title><link>http://20bits.com/articles/dynamic-ajax-tabs-in-20-lines/#comment-3793313</link><description>Jono,&lt;br&gt;&lt;br&gt;View source and take it to your hearts content. :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jesse</dc:creator><pubDate>Mon, 29 Oct 2007 17:09:22 -0000</pubDate></item></channel></rss>