Tab Manager 1 : Tab « GUI Components « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Dojo toolkit
7. Event
8. Event onMethod
9. Ext JS
10. Form Control
11. GUI Components
12. HTML
13. Javascript Collections
14. Javascript Objects
15. Javascript Properties
16. jQuery
17. Language Basics
18. Mochkit
19. Mootools
20. Node Operation
21. Object Oriented
22. Page Components
23. Rico
24. Scriptaculous
25. Security
26. SmartClient
27. Style Layout
28. Table
29. Utilities
30. Window Browser
31. YUI Library
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
JavaScript DHTML » GUI Components » Tab 
Tab Manager 1
 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DynAPI Examples - Tab Manager 1</title>
<script language="Javascript" src="./dynapisrc/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('./dynapisrc/');
dynapi.library.include('dynapi.api.ext.TabManager');
</script>
<style type="text/css">
td font:10px Helvetica; background-color:#dddddd; }
.center text-align:center; }
</style>
<script language="Javascript">
// tab manager listener
var tmListener={
  onblur:function(e) {
    var o=e.getSource();
    o.setBgColor('#cccccc');
  },
  onfocus:function(e) {
    var o=e.getSource();
    o.setBgColor('#aaaaaa');
  },
  onsubmit:function(e) {
    var o=e.getSource();
    o.setBgColor('#eeeeee');
    o.callSubmitFn();
  }
}
// default tab attributes
function Tab(html,x,id) {
  this.base=DynLayer;
  this.base(html,x,1,50,16,'#cccccc');
  if(idthis.setID(id)
  this.setClass('center');
}
Tab.prototype=new DynLayer();
// example 1
var e1=dynapi.document.addChild(new DynLayer(null,null,null,309,48));
// menubar 1
var m1=e1.addChild(new DynLayer(null,1,1,309,19,'#666666'));
m1.addChild(new Tab('&lt;&lt; First',1),'tab1').addSubmitFn('alert("First")');
m1.addChild(new Tab('&lt; Prev',52),'tab2').addSubmitFn('alert("Prev")');
m1.addChild(new Tab('Add',103),'tab3').addSubmitFn('alert("Add")');
m1.addChild(new Tab('Submit',154),'tab4').addSubmitFn('alert("Submit")');
m1.addChild(new Tab('Next &gt;',205),'tab5').addSubmitFn('alert("Next")');
m1.addChild(new Tab('Last &gt;&gt;',256),'tab6').addSubmitFn('alert("Last")');
m1.createTabManager();
m1.addTabListeners(tmListener)
m1.tab1.setBgColor('#aaaaaa');
var FORM=null;
var e4=dynapi.document.addChild(new DynLayer(null,null,null,400,150));
function getForm() {
  if(FORMreturn;
  FORM=TabManager.getForm(e4);
  var html4='When using the [Tabkey in Mozilla this text field prevents default tab focus. It may be <a href="" onclick="FORM.setVisible(false);return false;">hidden</a> (unfortunately the cursor is still visible).<br>When using NS4 on Linux with broken key events make sure this text field is <a href="" onclick="FORM.setVisible(true);return false;">visible</a> and click in the field to force focus and allow key input.'
  e4.addChild(new DynLayer(html4,30,0,350,100));
}
</script>
</head>
<body bgcolor="#eeeeee">
<table border=cellspacing=cellpadding=4>
<tr><td colspan=align="center">Tab Manager Demonstration 1</td></tr>
<tr>
<td valign="top">
<script>dynapi.document.insertChild(e1,'relative');</script>
</td>
<td valign="top"><ol>
<li>In NS4 click in the window and use the numeric keypad (Num Lockarrow keys to tab around the menus and the space key to select.
<li>For other browsers use the standard arrow keys to tab around the menus and the enter or space key to select.
<li>On some browsers it is possible to use the [SHIFT+Taband [Tabkeys to move left and right repectively.
<li>To prevent default tab focus when using the [Tabkey in Mozilla or when trying to use NS4 on Linux with broken key events, click <a href="" onclick="getForm();return false;">here</a>.</ol>
<script>dynapi.document.insertChild(e4,'relative');</script>
</td>
</tr>
</table>
</body>
</html>

           
         
  
dynapi.zip( 791 k)
Related examples in the same category
1. Tab Manager 2
2. Tab control for a game
3. Tabs in JavaScript
4. Tab with control inside
5. Slide tab
6. Tab control
7. Four Tab with different style
8. XP Tab in JavaScript
9. Two tab in one page
10. HTML style tab
11. Calendar in tab
12. Tab in javascript
13. Tab from gwidgets_0.8.0
14. One tab: Easy Tabs 1.2
15. Two tab: Easy Tabs 1.2
16. three tabs: Easy Tabs 1.2
17. Tabber Example
18. Nested tab and tab changed event
19. Set a cookie whenever the you click the tab, so if you leave the page and return the same tab remains selected
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.