RadioButton in JavaScript : RadioButton « GUI Components « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Event
7. Event onMethod
8. Form Control
9. GUI Components
10. HTML
11. Javascript Collections
12. Javascript Objects
13. Language Basics
14. Node Operation
15. Object Oriented
16. Page Components
17. Security
18. Style Layout
19. Table
20. Utilities
21. Window Browser
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
JavaScript DHTML » GUI Components » RadioButton 
RadioButton in JavaScript


<html>
<head>
<title>DynAPI Examples - HTML RadioButton</title>
<script language="JavaScript" src="./dynapisrc/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('./dynapisrc/');
dynapi.library.include('dynapi.api');
dynapi.library.include('TemplateManager');
dynapi.library.include('HTMLRadioButton');
</script>
<script language="Javascript">

var tp = new Template(
    'This is the Template (choose Car Color)<br>\n' +
    '<center>\n' +
    '  <form>\n' +
    '    <table border="1" width="180">\n' +
    '      <tr>\n' +
    '        <td align="center">\n' +
    '          Select an option below<br>\n' +
    '          {@optblue}Blue {@optred}Red\n' +
    '        </td>\n' +
    '      </tr>\n' +
    '    </table>\n' +
    '  </form>\n' +
    '</center>\n',
    100,100,250,200,'#EEEEEE'
);
tp.addChild(new HTMLRadioButton(null,'color','Blue Car',true),'optblue');
tp.addChild(new HTMLRadioButton(null,'color','Red Car'),'optred');

tp.optblue.addEventListener({
  onclick:function(e){
    var o=e.getSource();
    alert('This is a Radio Button with a value of "'+o.getValue()+'".');
  }
});

tp.optred.addEventListener({
  onclick:function(e){
    var o=e.getSource();
    alert('This is a Radio Button with a value of "'+o.getValue()+'".');
  }
});

dynapi.document.addChild(tp);

</script>
</head>
<body>
<script>
  dynapi.document.insertAllChildren();
</script>
</body>
</html>

           
       
dynapi.zip( 791 k)
Related examples in the same category
1. RadioButton in a Group
ww___w___.__j__av__a_2s_.c_o_m | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.