Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 907659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:35:23+00:00 2026-05-15T16:35:23+00:00

I use this code http://www.openjs.com/scripts/events/keyboard_shortcuts/index.php for handling keyboard shortcuts. shortcut.add(Ctrl+Z,function() { setTimeout(function() { var

  • 0

I use this code http://www.openjs.com/scripts/events/keyboard_shortcuts/index.php for handling keyboard shortcuts.

  shortcut.add("Ctrl+Z",function() {
  setTimeout(function() {
    var val= $("textarea").val();
    var length = val.split("\n").length;
    alert(length);
  }, 100);
  },{
    'type':'keydown',
    'propagate':true,
    'target':document.getElementById("textarea")
 });

I have problem when ctrl+z is pressed and there is nothing to undo – the alerts 2 ,not 1.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T16:35:23+00:00Added an answer on May 15, 2026 at 4:35 pm

    I’m not sure what the structure of your page is (a link would be handy), but I do notice a potential issue. In one place you’re requesting for an element with id “textarea”:

    'target':document.getElementById("textarea")
    

    But in another place you’re querying for all elements of type textarea, of which there could be multiple:

    var val= $("textarea").val();
    

    Did you intend to access an element with id “textarea” like this:

    var val= $("#textarea").val();
    

    That could be related to your issue if there are multiple textarea elements on your page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to rewrite http://website.com/?slug=product_info.php&products_id=32 to http://website.com/product_info/32 and I use this code, add_filter('rewrite_rules_array','wp_insertMyRewriteRules'); add_filter('query_vars','wp_insertMyRewriteQueryVars');
I found http://www.ibm.com/developerworks/xml/library/x-xml2jsonphp/ , but I don't know how to use this code to
I am using this reference http://www.openjs.com/articles/ajax/ajax_file_upload/response_data.php for ajax uploader ,its working absolutely fine for
I'm using this PHP class: http://www.phpclasses.org/browse/file/9524.html I use this code to make it work:
I use this code: http://blogswizards.com/plugin-development/sliding-boxes-and-captions-with-jquery On a simple gallery site I am building. Specifically
I tried to use this code but it doesn't work. http://developer.apple.com/library/ios/#samplecode/PageControl/Introduction/Intro.html Ld /Users/waitonza/Library/Developer/Xcode/DerivedData/Dr_Ngoo-aanknxmuodcgjicaigxevljxokeq/Build/Products/Debug-iphonesimulator/Dr Ngoo.app/Dr
I use this tutorial http://www.raywenderlich.com/2797/introduction-to-in-app-purchases for create purchases in my app. From time to
I use this code to load data into my textarea: jQuery('.content_container').load('http://www.evedalsvardshus.se/plugins/calendar/edit_dates.php', {'value': datum} );
here is the site : http://www.notrepanorama.com at the bottom left, i use a jquery
I have code like this: <span> <svg height=32 version=1.1 width=32 xmlns=http://www.w3.org/2000/svg style=overflow: hidden; position:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.