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

  • Home
  • SEARCH
  • 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 8176571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:14:03+00:00 2026-06-06T23:14:03+00:00

I want to this code to execute after an ajax-call (means .live) How should

  • 0

I want to this code to execute after an ajax-call (means .live) How should I change the code?

var el=document.getElementById('txt_url');
el.onkeyup=function(){
    var str=el.value;
    if(str=='') return;   
    if(str.indexOf('http://')==-1 && str.length >= 7)
    el.value='http://'+str;   
}
  • 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-06-06T23:14:05+00:00Added an answer on June 6, 2026 at 11:14 pm

    To live-bind a handler to an element use the jQuery .on() method. (As of jquery 1.7)

    $("body").on("keyup","#txt_url",function(){
       // your code
    });
    

    It replaces the deprecated .live() handler.

    Also, if you use jQuery, I’d suggest you to use it consistently – also for element-selection and handler-binding.

    Alternatively you could bind the handler in the success function but I prefer to do the eventbinding in a more consistent way.

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

Sidebar

Related Questions

How do I execute this code inside a Thread object? I want continuous execution,
Hi I have a JQuery js that does something like this after AJAX call:
When i am trying to write the code like document.getElementById('id1') after teh script tag
I'm new to PHP and I want this code <option value= disabled=disabled>-------------</option> to be
Why this code don't work,when i want run this code vwd 2008 express show
I want to add this code: <link rel=stylesheet type=text/css href=css/global.css /> <!--[if lt IE
I have this code in my controller and want to test this code line
I want to make this 1332251639632 to this 1332251639 I try this code, but
What I want is this What I am getting is this My code is
I'm getting a segmentation fault everytime i want to run this code : from

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.