469,903 Members | 1,659 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

euro

8
var euroRate

var response;

var amountInPounds, amountInEuros;

function twoDPs(anyNumber)
{
return Math.round (100 * anyNumber) / 100
};

function setEuroRate()
{
window.prompt('What is the current Euro rate?','')
}

When the user inputs the current Euro rate how do I assign it to the variable?
Mar 9 '06 #1
1 1494
Banfa
9,065 Expert Mod 8TB
You could easily find the answer to this question by checking an site that has a Javascript reference for instance http://www.w3schools.com

However the answer is that the value is returned as the return value of the function prompt so you just asign it to a variable in the normal way

var rate = window.prompt('What is the current Euro rate?','')
Mar 10 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Robert Zierhofer | last post: by
5 posts views Thread by Lars | last post: by
11 posts views Thread by MH | last post: by
18 posts views Thread by gabriel | last post: by
2 posts views Thread by tilmann | last post: by
5 posts views Thread by SalamElias | last post: by
8 posts views Thread by Max | last post: by
7 posts views Thread by kingski | last post: by
4 posts views Thread by Kim | last post: by
7 posts views Thread by Robertu | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.