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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:50:12+00:00 2026-06-06T14:50:12+00:00

I have made a script, but it’s not working as expected, and I need

  • 0

I have made a script, but it’s not working as expected, and I need help. You can see it here.

I need to implement the following behavior for the URL field only:

  1. When you click on the link, the target page opens. This works.
  2. When you click on the link’s parent div, the link becomes an editable input. This also happens, but my input field’s id is taken from an array, e.g. (url0, url1, url2), so when I have more than one URL in the form, only the first one works.
  3. When you click outside after editing the input, it becomes a link again.
  4. Also, when you double click on the link, it becomes editable.

Thanks in advance for all the answers, and I hope you can help me with this.

  • 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-06T14:50:13+00:00Added an answer on June 6, 2026 at 2:50 pm

    You can’t use the same id fоr different page elements – this is invalid markup, and, as you can clearly see, leads to invalid behavior. First things first, you might want to fix that in your markup.

    If you can’t change that (but, once again, you really should!), you can use some more involved selectors, for example:

    $('.cartRight > div > div > a').click(function(){
        $(this).parent().siblings("input").findval($(this).text()).show();
        $(this).hide();
    })
    

    Pretty silly, huh? You can probably use this mess as your last resort, though.

    As for double clicking, I wouldn’t recommend implementing such behavior; it is uncommon in a Web context, and might be confusing to users. Also, from a technical standpoint, a single click already starts to load the new page; you could use window.stop() to stop that if the link is double clicked, but you’ll need to manually implement a double click event, since:

    The dblclick event is rarely used. Even when you use it, you should be
    sure never to register both an onclick and an ondblclick event handler
    on the same HTML element. Finding out what the user has actually done
    is nearly impossible if you register both.
    (http://www.quirksmode.org/js/events_mouse.html#dblclick)

    I think you should just have a small “edit” button to the right (maybe a “pencil” icon?), instead of going with your current UI scheme. It seems quite confusing to me – not to mention the users…

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

Sidebar

Related Questions

I have made the following search script but can only search one table column
I have made this infinitely scrolling script, but I can't rebind the window scroll
I have made this timer script but I can't seem to make it so
Hi, I have made this simple script but I need to have it check
So I have a validation script I made a while ago. I can pass
I have made the following script to upload a csv and import it into
I have made a simple chat script using jquery and AJAX but the huge
I have made a subdomain and uploaded php script on that. but php code
Hi I have made the following item renderer in mxml, but when I use
i have made a crawler, but i can´t understand how i can go through

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.