Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Member wolf1728's Avatar
    Join Date
    Jan 2005
    Location
    Boston, MA
    Posts
    37
    Member #
    8723

    Basically, I have written a calculator which opens a second calculator when a button is clicked. I have to add another instruction to that button's onclick list which will instruct the program to go to a function called "passvar" which will get the values from calculator 1 and pass those on to calculator 2 before calculator 2 is opened.

    I have searched on a great number of JavaScript websites but have been unable to do this.
    Does anyone here know how to do this?



  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    If your calculator 2 is a separate page in a separate window, you could possibly pass the parameters from calculator 1 as querystrings.

    Read Parameters Passed Via Query Strings

    We'd have to see what you were doing, though, to see if this would work or to see if there is an alternative.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Member wolf1728's Avatar
    Join Date
    Jan 2005
    Location
    Boston, MA
    Posts
    37
    Member #
    8723
    Okay, I just uploaded 2 pages to my website:

    1) Calculator 1

    2) Calculator 2

    I wrote those to keep things as clear as possible.
    So calculator 1 will take the value of 3 numbers (one in each input box) and will output a sum of those numbers when "Calculate Sum" is clicked.
    The button beneath it (Calculate Product) opens calculator 2 which (just so it displays something) shows the numbers 1 through 99, with their squared values beside each number.

    I want calculator 2 to get the values of the 3 numbers input in calculator 1 and calculate the product and display it on calculator 2.

    Basically, all I need to know is how to pass the values from calculator 1 to calculator 2.

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    That's the problem with your question. It's so obscure in nature that you're probably not going to find a lot of people, if anyone, who have done it. It's not a bad question...it's a pretty good one. It's just not a common application.

    How did the querystring idea work out for you?
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:16 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com