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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:56:34+00:00 2026-06-17T14:56:34+00:00

Just a quick one – If I were to have a link such as

  • 0

Just a quick one – If I were to have a link such as this (REST):

http://request.com/action.jsp?parameter={{insert}}

How would I add a little JavaScript to populate the param with text from a text field?

I will just have a small text box which I can enter something like ‘TRUE’ and when I hit a button it transforms the link to this:

http://request.com/action.jsp?paramter=TRUE

And executes the link.

What should I be using? I was thinking getElementByID will that work? Could I place all this in a and use the following code?

document.getElementById("htmlDiv").innerHTML = document.getElementById("htmlText").value;

But how would I place the value from the text box into my link, make that value a variable? Any helps appreciated, trying to learn JavaScript and do a project at work 🙂

  • 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-17T14:56:35+00:00Added an answer on June 17, 2026 at 2:56 pm

    Something like this should work:

    var link = document.getElementById('linkid'),
      textBox = document.getElementById('textInputId');
    function setLinkParam() {
      link.href = 'http://request.com/action.jsp?parameter=' + textBox.value;
    }
    textBox.addEventListener('change', setLinkParam);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hopefully this is a quick one. If I have c# class files on WebsiteA.com
Just a quick one: what are peoples thoughts on using Action delegates for public
Just a quick one, hopefully. I've coded up this: <script> $(div.design-project).css('display', 'none'); function InsertContent(tid)
Just a quick one, Is there anyway to shorthand this? It's basically determining the
Just a quick question. I have one XML and I was hoping to tranform
Just a quick one, which is fustrating! I have three tabs which just literally
Hopefully this is just a quick one and I'm missing something simple... I've got
Hi guys I just have one quick question: what happens when an insert statement
just a quick question I have an array with only one object in it
Just a quick question. Which one of the following makes a better Rest API

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.