Jump to content

Search the Community

Showing results for tags 'onkeyPress'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

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


Languages

Found 2 results

  1. On my web I display configuration info, that user can edit, in a table.The correct user behavior should be to press Enter key after editing the field in order to set the changes. If he "leaves" the field without pressing Enter- the changes will be dismiss.In order to do that- I use "onkeyup" and "onblur" "onkeyup"(1) set a flag that field's content has been changed(2) if the key is Enter (==13) , it sends the server a set request with the current value(*) also tried "onkeypress" or "onkeydown" "onblur" - check the flag if the field's content has been changed. if so- send a refresh request to server that re-send current saved data (and erase user's changes). I recently noticed that while it works great in Chrome, on Explorer pressing the Enter key sets both events, and sometimes only the "onblur" event, thus ignores user's requests.... Do you have any idea how to deal with it? THANKS!!!!
  2. Hello again! I am having a problem on firefox.I have an event (onkeyPress) on a textarea, which should trigger a function when the key pressed is Intro.I would have the following on HTML: HTML Code:..<textarea id="idtextarea" onkeyPress="showUser(this.value)"></textarea>... In javascript: ...function showUser(str){var keycode;if(window.event) keycode = window.event.keyCode;else if (e) keycode = e.which;else return true;if (keycode == 13){var xmlhttp;if(str=="") {.... It works on the main browsers but not on Firefox. Nothing happens on this browser. I would appreciate any help.Thank you very much.Regards
×
×
  • Create New...