Calculate Volume Of Cylinder?
May 30, 2010I want to calculate the volume of a Cylinder using javascript code
View 2 RepliesI want to calculate the volume of a Cylinder using javascript code
View 2 RepliesI have the following problem: I have a swf file that I'm inserting in my page, this swf file has a sound(mp3 imported file in the stage). I was wandering if I can stop or set the volume to 0, from JavaScript, I found that I can do(play go to frame):
FlashID.GotoFrame(frameNumber);
FlashID.Play();
I have a javascript sound board that I've made for a Church skit but I'm wanting to be able to smoothly fade out the longer SFX without having to do it manually with the volume slider.
The Object: <span id="player_holder"><embed id="player" hidden="true" autostart="true" loop="false" volume="100"/></span>
How do I modify the volume value from: document.getElementById('player')
I wanna play streaming audio (an asx.file) trough javascript. I allready found a tutorial on the net. Till so far it works (I can push play, pause and stop), but I want to change the volume to. An example: Code:
Do you know where the problem is? One thing that I must say is that the tutorial (where I took it from) worked with a wav-file, as you can see I work with a streaming file (asx-file).
I have a question about the html5 videoplayer. I have made a videoplayer width own buttons and a volume control. But the volumecontrol doesn't work. The code of the volume control is bold.
<!DOCTYPE html>
I want to add onto my ebay auction a calculation which would show the unit price of a box of 5 electrical sockets.
So say it is currently on auction at £5.62 and I charge £1.99 Postage & packing thats a total of £7.61 with a unit price of £1.52. Then £1.52 is the figure I want to output and show on screen.
I'm just starting out in JS and would like to know how to solve this.
I have an HTML form with 3 checkboxes, like a would-be order form. For example, on checkbox 1, the product is a toy car that costs $5.00, second box is a cigar cutter for $50, etc. I to have a button that when clicked, enters the total price (no taxes or subtotals) into a textbox field below in the same page.
I believe that this has been answered somewhere but I cannot find it. I have 51 textboxes on page. In 50 I can enter value. 51st should tell me what is average of entered numbers.
As user types I want script to iterate trough form count and sum non-empty fields and than divides this two numbers.I need to sum values from fields that have value (not emty fields) and to divide this number by number of non empty fields. This should occur on every change in any of those 50 textboxes so to have live preview of average.
I'm really new to JS and I don't know even how to sum these numbers.
I have some data thats in a number, lets say 5455
.
Id like to get the TAX from an input, say like 2.5 percent. code...
I want to calculate X and Y of a div, but I get an infinite loop, can you tell me please what's the problem with my code? code...
View 4 Replies View RelatedI built 2 steps script - in the first page the visitor choose the date he want to schedual his appoitment and his location:
PHP Code:
<select name='zone'>
<option value='-4' selected> USA - EST</option>
<option value='-7'>USA - PST</option>
[code]....
In the second page he need to choose the time he want for his appointment (the time is in GMT+3 -> my local time). in this page the script also get the time zone and the date that he choose in the previous page (using POST - PHP). the date saved in variable. I used unix time (MKTIME function) I want that every time my visitor choose time (from drop-down box) a new cell/DIV will appear with his local time.for example - when he choose date: 10 May 2010, time zone: Austrlia - East Coast (+8 Hours) and time 22:00, New DIV will appear with the date "11 May 2010, 03:00AM" (there are 5 hours different).what is the JS what caculate and show the visitor local time?(I have, in PHP, only his time zone and the date that he coose in the first page)
I have tried many time to make the calculation to appear at the total text box.
here is my coding..
<html>
<head>
<title>
PRESENTATION EVALUATION FORM
[Code]....
I'm working on creating a custom calculator to determine the amount of money / credits users may earn from referrals. I've tested onChange, and it will work only when I have changed to a new field or clicked off that field. How do I make this calculate live?
So if the current value is 5 and I change it to 6, it will automatically recalculate the new value.
You can see what I'm working on here:
[URL]
Note: The one I'm testing is the 1st Level field. For now i'm just having it display the date.
Can someone explain to me how I should code to calculate this?
I want to let the user add 4 different numbers (this is done) and then I want to + these numbers with each other.
This is the code I got: var medel = tal1+tal2+tal3+tal4 ;
Let say the user enters 1+2+3+4. Then the result should be 10. But I get this number as result: 1234
What have I done wrong?
I am making what I call a PM (Preventive Maintenance) Kit list. My users will use this list to generate a printable sheet to tell me what they used out of there kit. The list includes pricing per part and I would like the list to calculate the costing as they enter each item. So a total per line and an overall total cost.
I have included a snap shot of the page and below is the code. I can do this sort of thing on a small scale with just adding two lines but I am not sure how to modify it to handle this scale. You can see the script towards the bottom of the page. That is my lame attempt to make the per line costing happen but NOTHING happens.
<?php
require "../config/bpts_config.php";
// Start the session
//session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
[Code]...
This is my coding that I try but I still cannot get the function to calculate cgpa.
<script language="Javascript" type="text/javascript">
/*Gred*/
function DisplayGred (GredPair) {
var Gred = GredPair.split('|');
var jam_kredit = document.getElementById('jam_kredit').value; (user input pay amount student pay for course)
document.getElementById('pointer').value = Gred[1]; (display course fee when item is selected)
}
function CalculateCGPA () .....
This is the interface look alike, the code subject, subject name and credit hours are retrive from the database, so how to calculate it?
</p>
<form id="form1" name="form1" method="post" action="">
<table width="552" height="82" border="0" class="tborder">
<tr bgcolor="#006699" class="text2">
<td width="17" bgcolor="#000099"><div align="center" class="style3"><strong><font size="2">Bil</font></strong></div></td> .....
I want to have 1 option box with values 10 100 1000 10000 etc in it , then i want to be able to select eg 100 and underneath it will show 100x25 which would be 2,500 so i want 1 box that has values of ten , hundred , thousand etc and they multiply by 25 and show underneath .
View 3 Replies View RelatedI have 3 textbox controls on my web page that are numeric currency fields in which a user can enter a numeric value, either positive or negative into TB1 and TB2 (both of these fields go thru edit checks to make sure a numeric value is entered and then return a currency value ie; $2500.00). TB3 is calculated resulting in TB3 = TB1 (($6500)) - TB2 ($2500).
My problem is that if a user enters a negative value for TB1, it returns a "NaN" and the value in TB3 turns out to be the same value as in TB2. Essentialy the calulation ends up being 0 - 2500 = 2500 (see screenshot). I've attached 2 functions below.
Code:
function cal_Overage_Shortage() {
if (make2Number("TB_LowPoint") <= 0) {
document.getElementById("TB_OverageShortage").value = GetValueTextbox("TB_LowPoint") + GetValueTextbox("TB_RequestedLowPoint");
[Code]....
Using this formula for parts per million, can somebody please show a SIMPLE example of how to calculate all formulas for ppm?i tried everything..like in kilograms, etc...anyway, the link:[URL]
View 9 Replies View RelatedFor my website i would like to display the age of my son in years,
months, days and hours.
For now i manage to get a result for totals. Like the total number of
days.
This is the beginning:
starttime = Date.parse("Aug 10,2003, 07:07")
sdt = new Date(starttime)
starttime= Math.ceil((starttime) / 1000 / 60 / 60 / 24 )
ndt = new Date()
y = sdt.getYear()
m = sdt.getMonth() + 1
d = sdt.getDate()
h = starttime
automatically calculate a total. The script pulls a price, which is given from a database to a hidden form field. Then once the quantity is changed the bottom form field automatically updates the price. Here's my script if someone could possibly point out why this might not be working (or is my logic flawed.)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Shopping Cart</title>
<script type="text/javascript">
/* <![CDATA[ */
function calcTotal(){
[Code]...
i have a problem with the arrays.i have entered all the relevant arrays to calculate a list of cheap quotations but when clicking on the submit button it doesnt do nothing.when clicking on the submit button i want it to bring up the list of quotations based on the data entered in the form..
View 7 Replies View RelatedPlease can u help? how would i get the total work hours between two times (8:30 to 5:30) from a web form.I tried just minusing one from the orther but it came back with "Nan"
View 2 Replies View Relatedwriting a function that will dynamically calculate filed values.I have a PHP-generated form which may have a varying number of fields. I need to:
1. calculate the line total for each row -- unitprice * units = linetotal
2. calculate total of all linetotals.
I have named my fields as follows:
unitprice[1], unitprice[2]... , units[1], units[2], ...
I have the following calculate function:
function calculateOld() {
// get both values
unitprice = document.forms["invoice"].unitprice.value;[code].....
This does calculate what I need but only if I have up to two rows. I need to make the function dynamically count how many rows there are, and calculate the linetotal for each row. And here's where my limited JS knowledge brings me to a halt.I have been thinking about what this new and dynamic function should look like, but that's the best I could produce...
function calculate() {
var unitprice[i]= document.forms["invoice"].unitprice[i].value;
var units[i]= document.forms["invoice"].units[i].value;[code]....
how things are done, don't just give me the code.
I can get the number of contributers to add up but not the total amount of dollars they contributed. I am not sure if my function is wrong or if I am just confused with what variable to output for the dollar amount total.
[Code]...
I am trying to calculate age based on the date of birth input into a text field.
the date field should allow users to enter a one or two digit month, one or two digit date and a two or four digit year. Users should be able to enter any of the following date formats: 11-2-10, 1-25-2010, or 01/25/2010. On some days it works and others it wont, like 11-1-91 returns that the user is under 18.
function checkAge(){
var stDate = document.getElementById("birth").value;
var dayPartToDate = parseInt(stDate.substring(0,2),10);
var monPartToDate = parseInt(stDate.substring(3,5),10);
[Code]....