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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:48:13+00:00 2026-05-15T21:48:13+00:00

I have x = 65; in a JavaScript page /var/html/pag1.js and I want to

  • 0

I have x = 65; in a JavaScript page /var/html/pag1.js
and I want to pass x to a different page: /var/html/user1/pageUser.js

What’s the easiest way to send a value like that?

  • 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-15T21:48:14+00:00Added an answer on May 15, 2026 at 9:48 pm

    Your question is a little unclear. In an attempt to decipher and give a good answer, I’ll restate your question. I believe you are trying to ‘post’ a field called ‘x’ with value of ’65’ to another page. You say you have a ‘page’ with name ‘page1.js’, but that is a script and not a page. You might have a ‘page1.html’ that references ‘page1.js’ (same for page2). I’ll proceed on the assumption you have 2 files:

    1. page1.html
    2. page1.js
    3. page2.html
    4. page2.js

    Normally, data is passed between pages using form actions like this…

    Page1.html:

    <body>
        <form action='page2.html' method='post'>
            <input type='text' name='x' value='65' />
            <input type='submit' />
        </form>
    </body>
    

    If you want to do this using javascript, you can should look into jquery and it’s post() method. Here’s an example in context…

    Page1.html:

    <body>
        <script type='text/javascript'>
            $.ajax({
                type: 'POST',
                url: 'page2.html',
                data: { x : 65 },
            });
        </script>
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

if I have a javascript variable: var page = <!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML
How do I pass have a Javascript script request a PHP page and pass
I have a javascript routine that dynamically creates an HTML page, complete with it's
Say I have several JavaScript includes in a page: <script type=text/javascript src=/js/script0.js></script> <script type=text/javascript
I have a page which spawns a popup browser window. I have a JavaScript
I'm writing a web page in ASP.NET. I have some JavaScript code, and I
Do you localize your javascript to the page, or have a master application.js or
I have this line in a javascript block in a page: res = foo('<%=
I have a view using a master page that contains some javascript that needs
I have a page using <ul> lists for navigation (Javascript changes the styling to

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.