Nitobi
Customer Login
Services
Products
About
Blogs
Contact
Home -> Product Knowledgebase Order Online | Free Trial Downloads

Nitobi Product Knowledgebase

Writing a Basic Combo Page


This tutorial applies for Classic ASP, JSP, and PHP but not for ASP.NET. ASP.NET developers should see the Writing a Basic Combo Page (ASP.NET) tutorial instead.

Setting up Your Files

  1. Create an empty ASP/JSP/ or PHP page.
  2. From the directory where you installed Nitobi ComboBox, copy the entire contents of the bin directory including .js, .css and image files to the same location where your project resides.

Include the JS file and set up the basic elements for Combo

Make sure you include the xml namespace statement in the <html> tag.  Next we include the JavaScript and CSS files, and make sure that the necessary initialization methods are being called in the onLoad <body> event.

<html xmlns:ntb>
<head>
   <link type="text/css" rel="stylesheet"
              class=BodyText rel=nofollow href="styles/bluetrim/combo.css">

   <script type="text/javascript" src="nitobi.toolkit.js"></script>
 <script type="text/javascript" src="nitobi.combo.js"></script>

   <script language="Javascript">

       function initialize()
       {
          nitobi.loadComponent('myCombo');
        }

   </script>

</head>

<body onload="initialize()">

</body>

</html>

Note the onload attribute of the body calls our special initialize() function with the necessary calls.

Finally, we write our combo tag(s) in the body.

eg:

<ntb:Combo id="myCombo" Mode="unbound">
 <ntb:ComboTextBox  DataFieldIndex=0 ></ntb:ComboTextBox>
 <ntb:ComboList Width="250px" Height="200px" >
 </ntb:ComboList>
   <ntb:ComboValues fields="City|Population">
     <ntb:ComboValue a="Vancouver" b="3,000,000" >
     </ntb:ComboValue>
     <ntb:ComboValue a="Toronto" b="4,500,000" >
     </ntb:ComboValue>
  </ntb:ComboValues>
</ntb:Combo>

Related Articles

View Printable Version

Comments:


Name:

Type the text you see above:

Comments:


Knowledgebase

To be notified of new articles when they're available, subscribe to our RSS feed.

Support Resources

Take advantage of our knowledgebase of product tutorials and tips, and our support forums!

Search Site


Sign up for our Newsletter:

Get industry articles and Nitobi company news in your inbox every couple of months — here's a sample!

Email:




Site RSS Feed  | All contents are (c) Copyright 2006, Nitobi Software Inc. All rights Reserved