Calendar
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
Archives
- October 2006 (3)
- September 2006 (10)
- August 2006 (10)
- July 2006 (53)
- June 2006 (1)
- November 2005 (2)
- More...
Monthly Statistics
Search
Syndicate this blog
Ajax Tabs Reloaded: based on the Havoc Studios article meta info
Demo Ajax Tabs Download Ajax Tabs From time to time you run across a cool site or test code and think that you may use it somewhere. I thought that about the HavocStudios Ajax tab system so I went back to the site to check it out. To my dismay, the site and its content is no longer available. Searches through Google, their cache and other systems turned up next to nothing except much interest in something that is long since gone. So what is a programmer to do? Recreate it of course using the parts I could locate. Without further ado, here it is. A trip through Google yielded what appears to be a modified version of the javascript but nothing else. After going over the script and fixing some errors and warning I then set about recreating the test case. Google's cache still had the HTML but no CSS or images but I was closer to my goal. I then hacked up the article from AListApart, grabbed some tab images and here it is in all of its glory. Since I did not write this script, I will simply append the information that I scraped from Google's cache. It may help you understand how the script is supposed to work. I also cannot say for a fact that this demo is the same/works the same but all of the fundamental features appear to work as expected. Here is the demo for Ajax Tabs. Ajax tabs Posted By Mr. Havoc @ 08:01pm
CSS Tabs seem to be all the rage with the kids these days. I love the idea of them. It seems that the most popular method of creating tabs using CSS is the Sliding Doors method. They seem to look the coolest and are very easy to implement. However, they're so... static.I've taken the idea of the sliding door tabs and mixed them up with a little javascript and ajax to make them very dynamic on the client side.Some of the features you get with these ajax tabs:
OpenTab(tabId, tabLabel, tabURL, tabIsCloseable, tabColor)This function creates a new tab or focuses on a tab if it already exists. tabId is a string that you create to give to this tab so that it can be accessed later. tabLabel is a string that is displayed on the tab itself. tabURL is a string the url to the page that contains the content that will be loaded with ajax. tabIsCloseable is a boolean (true or false) that specifies if the tab will have the "X" button that can close itself. tabColor is a string that specifies which css groups to use for this tab and panel. CreateNewTab(tabId, tabLabel, tabURL, tabIsCloseable, tabColor)You should never need to directly call this function, as OpenTab will call it if it needs to. The arguments are them same as OpenTab(). SetTabURL(tabId, url)This function allows you to change the URL to the tab's content after you have already opened the tab. Changing the URL also refreshes the content. tabId is the tabId of the tab you set when you created it. url is the url of the content. CloseTab(tabId)Closes the tab that has the id: tabId GetFocusedTabId()Returns the tabId of the tab that is currently focused FocusTab(tabId)Changes the focus to the tab with tab Id: tabId. RefreshTab(tabId)Refreshes the content of the tab with tab Id: tabId TabExists(tabId)Returns true or false depending on if a tab with tabId exists. Callback Events If the page that one of the tabs opens contains a hidden div tag with specially formatted javascript functions, those functions will be run by the ajax tabs. Take a look at the demo's page #3 source below: I am not sure where they have gone, but Havoc Studios had a good idea and a nice implementation. Over time I may use and extend this code and will post any changes that I make to this site. John McKnight Related PostsForms with moo.fx part 2What happened to... Simple Ajax Code-Kit (fixed) Forms with moo.fx part 1 My top web developer sites Comment from: Joe [Visitor] I found your site today while looking for Ajax Tabs (which I already tested out and love). I read a couple other articles and have already added you to my favorites. Thanks for the ajax tab tips and other good site info. Comment on this article This post has 25 comments awaiting moderation. |
