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 6654171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:21:29+00:00 2026-05-26T01:21:29+00:00

$(document).ready(function(){ var CurrentTextBoxID = ; var shifton = false; var IsCapsLockOn = false; //

  • 0
$(document).ready(function(){
var CurrentTextBoxID = "";
var shifton = false;
var IsCapsLockOn = false;   

// toggles the keyboard to show or hide when link is clicked
$(":text").focus(function(e) {              
    CurrentTextBoxID = this.id;
    var top = ($(window).height() - $('#keyboard').height()) - 25;        
    var left = ($(window).width() - $('#keyboard').width()) / 2;

    alert(CurrentTextBoxID + " focus In");

    $('#keyboard').css(
        {               
            "left": left+"px",
            "top": top+"px"
        }
    ).toggle();

});

$('#'+CurrentTextBoxID).blur(function() {
    alert("**");
});


$('#'+CurrentTextBoxID).focusout(function() {
    alert(this.id + " focus out");
});

At this upper code, blur function and focusout function did not work.
When I change code like that it work.

$('#txtTest1').blur(function() {
    alert("**");
});


$('#txtTest1').focusout(function() {
    alert(this.id + " focus out");
});

But by changing code like that, I cannot give text box ID dynamically.
So, Please let me know how could i make like that.

$( DYNAMIC ID ).focusout(function() { .... });
  • 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-26T01:21:30+00:00Added an answer on May 26, 2026 at 1:21 am

    As I feel you need to bind those blur and focusout function for all text boxes. If you do it one by one in focus (as in the answer of @Gabe)function you will be binding that function again when some next focus event happens.
    I think you need to do like this,

    $(":text").blur(function() {
        alert("**");
        var element=$(this); // you can get the element here
    });
    
    
    $(":text").focusout(function() {
        alert(this.id + " focus out");
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<script type=text/javascript> $(document).ready(function() { $('a.menuitem').click(function() { var link = $(this), url = link.attr(href); var
I'm using the following code.. $(document).ready(function(){ $(#test a).click(function(){ var labelTo = $(this).text(); window.location =
HI, I've got: <script language=javascript type=text/javascript> $(document).ready(function() { $(#thumbs a).click( function() { var BGswitch
$(document).ready(function() { var response = $.ajax({ type: GET, url : http://www.google.com, async : false,
$(document).ready(function() { $('a.menuitem').click(function() { var arr = 0; var link = $( this ),
Here is the JavaScript I am using: <script type=text/javascript> $(document).ready(function(){ var left_pos= document.getElementById('login_button').offsetLeft; var
$(document).ready(function() { $(.po).click(function(){ var po = $(this).text(); var dataString = 'po='+ po; $.ajax ({
I have a ajax function as below <script type=text/javascript> $(document).ready(function () { var timer,
I have this code right now : $(document).ready(function() { var ktitle = $('.hiddentwo').text(); $('div#tab2').load('morefour.php?title=ktitle');
I have this JQuery function: $(document).ready(function() { $(div.descript_long).each(function() { var descript_length = $(div.descript_long).text().length; if(descript_length

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.