adatapost
Reaction score
0

Profile posts Latest activity Postings About

  • :: Navigate Controls ::

    <head>
    <title>Enter key :: Focus Navigation</title>
    <script type="text/javascript">
    // <![[CDATA
    function goon()
    {
    var act_id;

    act_id=document["activeElement"]["id"];

    if(window["event"].keyCode==13)
    window["event"].keyCode=9;

    if(act_id=="last")
    form1["defaultfocus"]="item0";
    kk1["innerHTML"]=act_id + " has hot the focus";
    }
    // ]]>
    </script>
    </head>
    <body>
    <form id="form1" method="post" action="enterkey.htm" onkeydown="goon()">
    <div id="kk1">

    </div>
    <hr />
    <div>
    <br />No <input type="text" id="item0" name="no" />
    <br />Name <input type="text" id="item1" name="name" />
    <br />
    </div>
    </form>
    </body>
    How can I use enter key to transfer focus of one web widget (html text or select) to another?.
    Read and Update Excel document from using COM and NET.
    =======================================
    using System.Collections;
    using Microsoft.Office.Interop.Excel;
    using System;
    using System.Reflection;
    class Sample
    {
    static void Main()
    {
    string file = @"c:\csnet\jap\ex1\sample1.xlsx";
    Microsoft.Office.Interop.Excel.ApplicationClass ap = new ApplicationClass();
    Missing m=Missing.Value;
    Workbook wb=ap.Workbooks.Open(file, m, m, m, m, m, m, m, m, m, m, m, m, m, m);
    Worksheet sh =(Worksheet) wb.Sheets[1];
    for (int i = 1; i < 10; i++)
    {
    for(int j=1;j<=3;j++)
    {
    Range r =(Range) sh.Cells[i, j];
    Console.Write(r.Value2);
    }
    Console.WriteLine();
    }
    ap.Quit();

    }
    }
    =========================================
    Comment on this code, please.
  • Loading…
  • Loading…
  • Loading…
Top