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 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
Okay, I have this code: <script language=javascript type=text/javascript> <!-- function requestPage(page) { var request
I have a problem with JavaScript magic. When I execute this code: var page
I have a PHP File with something like this: <script type=text/javascript> var page =
I have multiple javascript functions in my html page. One of them, by far
I have a javascript routine that dynamically creates an HTML page, complete with it's
I have a JavaScript function for a HTML button click event in aspx page
I have a javascript page that is supposed to send the username that the
I have a javascript slider located on a page at: crothersenvironmental.com/crothers/index.html that keeps sending
I have a javascript page which checks an email and username, this works fine

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.