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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:39:35+00:00 2026-06-06T04:39:35+00:00

I have a form with inputs, the Jquery makes a specific input (the url

  • 0

I have a form with inputs, the Jquery makes a specific input (the url input) form input to link, but i have for example two inputs of the url, the HTML ids are url0 and url1 and still when i want to edit the first input/url0 the inputs of the url1 is making visible and the changes are made for the url1 not url0 and when click out the input it makes the value of url1 same with the url0, you can see exactly what i mean here – jsfiddle

thanks a lot

exact steps:

  1. Form with inputs
  2. two url inputs url0/url1
  3. onload they are links but with a hidden input in HTML on click activate the input so can be editable
  4. when click out of the input it converts to links again

Problem is those two inputs (url0/url1) gets confused and make strange behavior on edit. please check the link above to see

  • 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-06T04:39:36+00:00Added an answer on June 6, 2026 at 4:39 am

    See working jsFiddle here.

    Here is the modified JS which works when you click on the link –

    $('.a0 a').click(function(e){
        e.preventDefault();
        $(this).parent().parent().find('input').val($(this).text()).show().focus();
        $(this).parent().hide();
    })
    
    $('#url0, #url1').each(
        function(index, element){
            $(element).blur(function(){
                $(this).hide().prev().show().find('a').html(this.value);
        })
        }    
    );
    

    The following works when you click on the div the link is in – jsFiddle

    $('.a0').click(function(e){
        e.preventDefault();
        $(this).parent().find('input').val($(this).find('a').text()).show().focus();
        $(this).hide();
    })
    
    $('#url0, #url1').each(
        function(index, element){
            $(element).blur(function(){
                $(this).hide().prev().show().find('a').html(this.value);
        })
        }    
    );
    

    ​

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

Sidebar

Related Questions

I have a form where users can add input fields with jQuery. <input type="text"
I have a form that uses jquery to generate rows of input fields these
I have a form that I pre-populate with test data though jQuery. $('INPUT[name=subscription.FirstName]').val('Jef'); but
I'm working with jquery. And i have text input in a form, i would
I have am HTML form in a PHP page. The form has various inputs.
I have a search form with inputs and selects, and when any input/select is
I have a form with the following inputs: <input type=text name=products[1][rrp] class=rrp> <input type=text
I have an HTML form with plenty of inputs, most of which are optional.
I have a form object in jquery, and I'd like to select all inputs
I am hooking into Html Form submissions where the submit buttons have a specific

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.