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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:35:35+00:00 2026-06-02T13:35:35+00:00

Situation: I am building a JS tool that lets you edit html templates live

  • 0

Situation:
I am building a JS tool that lets you edit html templates live in your browser. I’m currently using this code to dump what I type into specific DOM elements:

   $('#copyTagline').keyup(function() {
    $('#tagline').html($(this).val());
});

So as the user types in the textarea copyTagline it prints in an html object with the id of tagline.

Question:
I want to achieve this with a url so that user can copy and paste in their facebook or twitter url but I can’t insert an html object within my anchor tag. Does anyone know how I could create a variable that is functioning the way I using the snippet above sans html object?

Note: In browsing SO I found some discussions on using docment.write and other various global methods, which make sense, but I’m not sure how I would structure the script to print what ever the user types into the URL string.

  • 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-02T13:35:41+00:00Added an answer on June 2, 2026 at 1:35 pm

    Your question is a little unclear. Perhaps you could rephrase the question? Are you trying to rewrite the URI in the location field of the browser? (I ask because of the hashtags you’ve used for this question). In that case, see this post: http://bytes.com/topic/javascript/answers/170365-change-browser-url-without-navigating-away

    “but I can’t insert an html object within my anchor tag”
    If you’re simply asking how to update the HREF attribute of an anchor tag, try $(“#anchor”).attr(“href”, $(this).val());

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

Sidebar

Related Questions

I'm currently in a situation where I'm building a script that I know will
Situation: A PHP Templating system that is responsible for building a pages HTML. Javascript
I'm currently building a tool for my game engine using WPF. The tool is
I have a unique situation where I'm building a site that will call data
Situation: text: a string R: a regex that matches part of the string. This
I'm having trouble building a layout. My situation is this: I have an Activity
I have a unique situation where I am building a DDD based system that
I'm building an application using WPF and MVVM. I've come across a situation where
Situation: I have a calculator that I am building with js. It is a
I am building a game which uses achievements currently. Let's imagine the following situation:

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.