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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:09:27+00:00 2026-05-25T01:09:27+00:00

I can’t seem to get this to work and I’ve tried quite a bit.

  • 0

I can’t seem to get this to work and I’ve tried quite a bit. I have a jscript file that contains a very long and involved function that does various calculations. I am trying to pass values for variables that exist within the jscript file. The jscript file contains 3 variables that I would like to have the ability to change from the HTML forms page.

The variables within the jscript file that I am trying to change are vehicleWeight, wheelbase, and tireChoice. Note that the jscript file works flawlessly but I’d like to be able to change the variables without going in and manually saying var vehicleWeight = 300, etc. The function I am running in framework.js is Main.

This is what my HTML page looks like.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Untitled Page</title>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
    <script type="text/javascript" src="framework.js"></script>
    <script type="text/javascript">
        function ShowCalculation() {
            Main($("#wheelBaseTxt").val(), $("#tireChoiceSel").val(), $("#wheelBaseTxt").val());
        }
    </script>
</head>
<body>
    Vehicle Weight:
    <input id="vehicleWeightTxt" type="text" /><br />
    Tire Choice:
    <select id="tireChoiceSel">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
    </select><br />
    Wheel Base: <input type="text" id="wheelBaseTxt" /><br />
    <input type="submit" onclick="ShowCalculation(); return false;" />
</body>
</html>
  • 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-25T01:09:27+00:00Added an answer on May 25, 2026 at 1:09 am

    Its hard to say without viewing your javascript include but you may need something similar to the code below inside your Main function.

    var vehicleWeight = 0.0;
    var wheelbase = 0.0;
    var tireChoice = 0.0;
    function Main(inpVehicleWeight, inpWheelbase, inpTireChoice) {
       vehicleWeight = inpVehicleWeight;
       wheelbase = inpWheelBase;
       tireChoice = inpTireChoice;
    
       // ... other calculations, etc ...
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can any one tell, how to get the result of LINQ query contains group
I have just tried to save a simple *.rtf file with some websites and
Can't figure out how to do this in a pretty way : I have
Can someone please explain why this doesn't work? MyClass myClass1 = new MyClass(); object
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Can anyone tell me why this doesn't work? <?php $lang = $_get[lang]; if (($lang
can anyone tell me why this doesn't work? db = openOrCreateDatabase(database.db, SQLiteDatabase.CREATE_IF_NECESSARY, null); db.setLocale(Locale.getDefault());
Can't work out a way to make an array of buttons in android. This
Can find why i get this error can someone help? package Android.data; public class
Can anyone help me trying to find out why this doesn't work. The brushes

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.