'boundElements' Example : boundElements « Javascript Collections « JavaScript Reference

JavaScript Reference
1. Event Handlers Reference
2. Javascript Collections
3. Javascript Methods
4. Javascript Objects
5. Javascript Properties
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 DHTML
JavaScript Tutorial
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 Reference » Javascript Collections » boundElements 
'boundElements' Example

    
<html>
<head>
<title>Recordset Events</title>
<script language="javascript">
function rowEnter(){
    myTable.rows[myData.recordset.AbsolutePosition].style.backgroundColor = 'yellow';
}
function add(){
    myData.recordset.AddNew();
}
function del(){
    if (myData.recordset.RecordCount > 0
        myData.recordset.Delete();
}
</script>
<script for="myTable" event="onreadystatechange">
    if (this.readyState == 'complete'){
        this.rows(myData.recordset.AbsolutePosition).style.backgroundColor = 'yellow';
        myData.onrowenter = rowEnter;
    }
</script>
<script for="myData" event="onrowexit">
    for (var i = 1; i <= myData.recordset.RecordCount; i++) {
       myTable.rows[i].style.backgroundColor = '';
    }
</script>
<script for="tableList" event="onclick">
    myData.recordset.AbsolutePosition = this.recordNumber;
    window.event.cancelBubble = true;
</script>
<script for="myData" event="oncellchange">alert(event.boundElements(00).value);</ script>
</head>
<body>
<input id=cmdAdd type="button" value="ADD RECORD" onclick="add();">
<input id=cmdDelete type="BUTTON" value="DELETE" onclick="del();">
<object classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83" id="myData">
    <param name ="DataURL" value="myfile.csv">
    <param name="UseHeader" value="True">
    <param name="TextQualifier" value="'">
</object>
<table>
    <tr>
        <td>First Name</td>
    </tr>    
    <tr>
        <input id="firstname" type="text" datasrc="#myData" datafld="firstname"></td>
    </tr>
    <tr>
        <td>Last Name</td>
        <td><input id="lastname" type="text" datasrc="#myData" datafld="lastname"></td>
    </tr>
</table>
<table id="myTable" datasrc="#myData">
    <thead>
        <tr style="font-weight:bold">
            <td>First</td>
            <td>Last</td>
        </tr>
    </thead>
    <tbody>
    <tr id="tableList">
        <td><span datafld="firstname"></span></td>
        <td><span datafld="lastname"></span></td>
    </tr>
    </tbody>
</table>
</body>
</html>


<!-- myfile.csv  -->
<!-- 
Contents of relatives.csv:
firstname:string,lastname:string
A,B
C,D
E,F
-->
    
      
      
Related examples in the same category
1. 'boundElements' Syntax Parameters and Note
2. 'boundElements' JavaScript properties and JavaScript methods
3. 'boundElements' is applied to
ww__w._ja_v_a__2_s___.___c_o_m | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.