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

  • Home
  • SEARCH
  • 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 6158405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:57:08+00:00 2026-05-23T20:57:08+00:00

I want to pass the value entered by a user in a form field

  • 0

I want to pass the value entered by a user in a form field from a page called “productDetail” to the form field in a page called “gmap-3”.

Now normally, if both fields were on the same page, I’d just do something like :

$('#productDetail').live("pagecreate", function() {
    $('#submitPost').tap(function() {
        if ($('#postalFrom').val()== "" || null) {
            var postalCode = $('#postalFrom').val();
            alert("Enter postal code first.");
        } else {
            $('#from').val(postalCode);
        }
    });
});

But considering the form field “(‘#from’)” is on the page “g-map3” and not “productDetails”, how can I accomplish that ?

Thanks in advance !

  • 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-05-23T20:57:09+00:00Added an answer on May 23, 2026 at 8:57 pm

    when going from one page to another, pass the values with the url e.g.

    http://example.com?postalCode=11204&fname=john&lname=doe
    

    then parse the url with location.search. something like

    var params = location.search.substring(1,location.search.length).split("&");
    for (var i = 0; i < params.length; i++)
    {
      var field = params[i].split("=")[0];
      var value = params[i].split("=")[1];
      // process
    }
    

    EDIT

    forgot to get rid of the “?” 😛 hence the substring(1,location.search.length)

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

Sidebar

Related Questions

I have a simple registration form. I want to pass value entered in one
i want to pass a string value from one page to another.Also i have
On loading the page I want to pass a value to my javascript function
I want to pass javascript object/ variable from page to another. so that i
I want to pass value of a variable from template to a templatetag but
I want to pass the value entered in a UITextfield into another view. and
I have this snippet of code below. I want to pass the value of
I want to pass a datetime value into my python script on the command
I want to pass a number value to a Timer. How do I do
I want to pass an ImageIcon instance by value as we know that by

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.