Jump to content

Search the Community

Showing results for tags 'caps lock'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • General Development
    • uniGUI Releases & Roadmaps
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
    • Third Party Components
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. Hi All. A simple example, which detects the capslock key and displays a warning. Of course it is impossible to determine synchronously, but this code can be useful when your input type = "password" (perhaps the code is not optimal...) UniEdit1 ... -> function afterrender(sender, eOpts) { var capslock_td = document.createElement('td'); capslock_td.setAttribute("id", "capslock_td"); Ext.get(sender.id+"-inputRow").appendChild(capslock_td); //Ext.get(sender.id).appendChild(capslock_td); capslock_td.innerHTML = "<table style='width:120px'><td></td><td><img width=16 height=16 src='ext-4.2.2.1144/resources/ext-theme-classic-sandbox/images/shared/icon-warning.gif'></td><td><span id='capslockspan' style='font-size:13px;'>CapsLock ON!</span></td></table>"; capslock_td.hidden = true; Ext.onReady(function () { function _capsLockDetect(e) { if (!e) e = window.event || null; if (typeof (oncapslock) != "function" || !e) return; var n = e.keyCode ? e.keyCode : e.charCode; if (e.type == "keypress") { var c = String.fromCharCode(n); var cUC = c.toUpperCase(); var cLC = c.toLowerCase(); if (cUC != cLC) oncapslock((e.shiftKey && cLC == c) || (!e.shiftKey && cUC == c)); } else if (e.type == "keydown" && n == 20) oncapslock(false); } if (document.addEventListener) { document.addEventListener("keypress", _capsLockDetect, false); document.addEventListener("keydown", _capsLockDetect, false); } else if (document.attachEvent) { document.attachEvent("onkeypress", _capsLockDetect); document.attachEvent("onkeydown", _capsLockDetect); } else document.onkeypress = document.onkeydown = _capsLockDetect; window.oncapslock = function (on) { Ext.get("capslock_td").dom.hidden = !on } }); } Best regards.
×
×
  • Create New...