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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:05:41+00:00 2026-06-14T13:05:41+00:00

I have a particular form on my page with multiple input values and a

  • 0

I have a particular form on my page with multiple input values and a button. Example:

<form id="myForm" method="get">
<input type="text" id="blah1" value="blah" />
<input type="hidden" id="blah2" value="blah2" />
</form>
<button type="button" id="awesomeButton">Click for Link</button>
<div id="link">http://mysite.com/?blah1=blah&blah2=blah2</div>

I want to find an easy way to make it so when someone clicks the button on my website, it looks at all the form values and generates a link which is exactly the same as if the form was set to use method=”get” and submitted. So if they click “awesomeButton”, then it’ll generate a link and show it to the person, such as http://mysite.com/?blah1=blah&blah2=blah2

Does anybody know an easy way to grab the values from the form and make a link?

Something like…

$('button#awesomeButton').click(function()
{
//Grab all form elements, maybe something like var blah = $('#myForm :input'); ??
var link = ???;//Generate a link somehow
$('div#link').html(link);
});

Thanks

  • 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-14T13:05:42+00:00Added an answer on June 14, 2026 at 1:05 pm

    The easy way is to use a library like jQuery or dojo that will do the job for you. In jQuery for example:

    $("#myForm").serialize();
    

    The documentation is here.

    In dojo:

    dijit.byId('myForm').get('value');
    

    Follow this link for the documentation.

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

Sidebar

Related Questions

I have multiple forms on a page. I have created a button to hide
I have a form on an HTML page with multiple submit buttons that perform
The JQuery has method effectively selects all elements where they have particular descendants. I
I have a particular method that is occasionally crashing with an ArgumentException: Destination array
I have been facing some serious issues while executing this particular JSP page. CODE
i have a search form page, which takes me to reslutant page and show
I have a custom form field type and an associated form theme for it.
I want to know how spring's multiple form:select works for following scenario: I have
I have a single page asp.net 4.0 form with couple of textboxes in divs
We have a form that passes 3 parameters, fname, lname, hiredate to another page

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.