Results 1 to 3 of 3

Thread: delete button on on screen keyboard

  1. #1
    Join Date
    Jan 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default delete button on on screen keyboard

    i am having difficulty make the delete link for my on screen keyboard work. does anyone have any suggestions?

    //JavaScript Document
    function Append(letter)
    {
    input.comments.value = input.comments.value + letter;
    }
    function backspace()
    { var l = input.comments.value.length - 1;
    input.comments.value = input.comments.value.replace(input.comments.value.charAt(l),"");
    }

    <%@ Page language="c#" Codebehind="feedbackcontentwriter.aspx.cs" AutoEventWireup="false" Inherits="HealthKiosk.Default.feedback.feedbackcontentwriter" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <title>feedbackcontentwriter</title>
    <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
    <meta content="C#" name="CODE_LANGUAGE">
    <meta content="JavaScript" name="vs_defaultClientScript">
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    <LINK href="../../../scripts/css/healthkiosk.css" type="text/css" rel="stylesheet">
    <script language="JavaScript" src="../../../Scripts/JavaScripts/preloader.js" type="text/javascript"></script>
    <script language="JavaScript" src="../../../Scripts/JavaScripts/keyboard.js" type="text/javascript"></script>
    </HEAD>
    <body class="content" MS_POSITIONING="GridLayout">
    <form name="input">
    <div align="center">
    <form runat="server">
    <textarea cols="120" rows="10" name="comments"></textarea>
    <br>
    </form>
    <br>
    <table>
    <tr>
    <td colspan="2">
    <table align="center">
    <tr>
    <td width="60" height="60"><A onclick="Append('`')" href="#">`</A></td>
    <td width="60" height="60"><A onclick="Append('1')" href="#">1</A></td>
    <td width="60" height="60"><A onclick="Append('2')" href="#">2</A></td>
    <td width="60" height="60"><A onclick="Append('3')" href="#">3</A></td>
    <td width="60" height="60"><A onclick="Append('4')" href="#">4</A></td>
    <td width="60" height="60"><A onclick="Append('5')" href="#">5</A></td>
    <td width="60" height="60"><A onclick="Append('6')" href="#">6</A></td>
    <td width="60" height="60"><A onclick="Append('7')" href="#">7</A></td>
    <td width="60" height="60"><A onclick="Append('8')" href="#">8</A></td>
    <td width="60" height="60"><A onclick="Append('9')" href="#">9</A></td>
    <td width="60" height="60"><A onclick="Append('0')" href="#">0</A></td>
    <td width="60" height="60"><A onclick="Append('-')" href="#">-</A></td>
    <td width="60" height="60"><A onclick="Append('=')" href="#">=</A></td>
    <td width="60" height="60"><A onclick="backspace()" href="#">BackSpace</A></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td><table align="center">
    <tr>
    <td width="60" height="60"><A onclick="Append(' ')" href="#">tab</A></td>
    <td width="60" height="60"><A onclick="Append('q')" href="#">q</A></td>
    <td width="60" height="60"><A onclick="Append('w')" href="#">w</A></td>
    <td width="60" height="60"><A onclick="Append('e')" href="#">e</A></td>
    <td width="60" height="60"><A onclick="Append('r')" href="#">r</A></td>
    <td width="60" height="60"><A onclick="Append('t')" href="#">t</A></td>
    <td width="60" height="60"><A onclick="Append('y')" href="#">y</A></td>
    <td width="60" height="60"><A onclick="Append('u')" href="#">u</A></td>
    <td width="60" height="60"><A onclick="Append('i')" href="#">i</A></td>
    <td width="60" height="60"><A onclick="Append('o')" href="#">o</A></td>
    <td width="60" height="60"><A onclick="Append('p')" href="#">p</A></td>
    <td width="60" height="60"><A onclick="Append('[')" href="#">[</A></td>
    <td width="60" height="60"><A onclick="Append(']')" href="#">]</A></td>
    </tr>
    </table>
    </td>
    <td rowspan="3"><A onclick="Append('\n')" href="#">enter</A></td>
    </tr>
    <tr>
    <td colspan="2">
    <table align="center">
    <tr>
    <td width="60" height="60"><A onclick="Append('!!!!!')" href="#">CAP</A></td>
    <td width="60" height="60"><A onclick="Append('a')" href="#">a</A></td>
    <td width="60" height="60"><A onclick="Append('s')" href="#">s</A></td>
    <td width="60" height="60"><A onclick="Append('d')" href="#">d</A></td>
    <td width="60" height="60"><A onclick="Append('f')" href="#">f</A></td>
    <td width="60" height="60"><A onclick="Append('g')" href="#">g</A></td>
    <td width="60" height="60"><A onclick="Append('h')" href="#">h</A></td>
    <td width="60" height="60"><A onclick="Append('j')" href="#">j</A></td>
    <td width="60" height="60"><a href="#" onclick="Append('k')">k</a></td>
    <td width="60" height="60"><a href="#" onclick="Append('l')">l</a></td>
    <td width="60" height="60"><A onclick="Append(';')" href="#">;</A></td>
    <td width="60" height="60"><a href="#" onclick="Append('\u0022')">"</a></td>
    <td width="60" height="60"><a href="#" onclick="Append('|')">|</a></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td colspan="2"><table align="center">
    <tr>
    <td width="60" height="60"><a href="#" onclick="Append('\\')">\</a></td>
    <td width="60" height="60"><a href="#" onclick="Append('z')">z</a></td>
    <td width="60" height="60"><a href="#" onclick="Append('x')">x</a></td>
    <td width="60" height="60"><a href="#" onclick="Append('c')">c</a></td>
    <td width="60" height="60"><a href="#" onclick="Append('v')">v</a></td>
    <td width="60" height="60"><a href="#" onclick="Append('b')">b</a></td>
    <td width="60" height="60"><a href="#" onclick="Append('n')">n</a></td>
    <td width="60" height="60"><a href="#" onclick="Append('m')">m</a></td>
    <td width="60" height="60"><a href="#" onclick="Append(',')">,</a></td>
    <td width="60" height="60"><a href="#" onclick="Append('.')">.</a></td>
    <td width="60" height="60"><a href="#" onclick="Append('/')">/</a></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td colspan="2"><table align="center">
    <tr>
    <td width="60" height="60"><a href="#" onclick="Append(' ')">space</a></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </div>
    </form>
    </body>
    </HTML>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,190 Times in 3,154 Posts
    Blog Entries
    12

    Default

    There is no case insensitive string match for 'del' anywhere in your supplied code. Are you sure you don't mean that you are having trouble with the backspace key?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    function backspace()
    {
      input.comments.value = input.comments.value.substring(0, input.comments.value.length - 1);
    }
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •