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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:57:36+00:00 2026-06-06T16:57:36+00:00

I have a form with an input textbox and a button. When I click

  • 0

I have a form with an input textbox and a button. When I click on a button I want to go to a different page depending on the value of the input textbox. For example:

<form name="frm1" id="frm1" action="page.php">
    <input type="text" name="txt_name" id="txt_name" value="simple text" />
    <input type="button" Onclick="redirect_to('page2.php/?id=8&input=this.txt_name.value')" value="Save" />
</form>

How can I get this value? Can this be done without using a function?

  • 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-06T16:57:37+00:00Added an answer on June 6, 2026 at 4:57 pm

    if you have something like :

    <form>
      <input type="text" name="formelem" />
      <input type="button" />
    </form>
    

    you can put to the button :

    onclick="redirect_to('page.php/?id=8&input='+this.form.formelem.value)"
    

    you are on the button, so “this” will be the button and you need to get the form from which you can get the input

    another way ( if you don’t need a form for another purpose ) would be to just put :

    <input type="text" id="formelem" />
    <input type="button" onclick="redirect_to('page.php/?id=8&input='+document.getElementById('formelem').value)" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web form in silverlight. On action of some button click i
I have form with multiple input type=radio with text next to them. I want
I have a form with input fields and a button which fades in when
I have an asp.net web form with an html input and button at the
Basic question; I have this code: var partipiansRow = '<div class=form-row ><input type=text id=name
I have a <form /> with a text box, and an <input /> button.
So I have an input form that I want to use to update a
I have a form in which I have a textbox and a button. When
I have a text box and a button in a form.i want to save
I have a simple input form that consists of a single textbox and an

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.