olpray
01-10-2007, 05:19 PM
i have a small piece of javascript i have written using a prompt, i need to take what is entered into the prompt box and use it in an if statement, can anyone help me?
<html>
<head>
<SCRIPT LANGUAGE = JavaScript>
function CityTimes() {
prompt("Please Input Your City Below","Type Here") ;
</SCRIPT>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>City Times</title>
</head>
<body>
<p><u><font size="7"><b>City Times</b></font></u></p>
<p>New York</p>
<p>Paris</p>
<p>Moscow</p>
<p>Beijing</p>
<p>Tokyo</p>
<p>Sydney</p>
<input type = "button" value="Click here to input a city" name="cmdTimes" onclick ="CityTimes() " >
</body>
</html>
anyone?
<html>
<head>
<SCRIPT LANGUAGE = JavaScript>
function CityTimes() {
prompt("Please Input Your City Below","Type Here") ;
</SCRIPT>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>City Times</title>
</head>
<body>
<p><u><font size="7"><b>City Times</b></font></u></p>
<p>New York</p>
<p>Paris</p>
<p>Moscow</p>
<p>Beijing</p>
<p>Tokyo</p>
<p>Sydney</p>
<input type = "button" value="Click here to input a city" name="cmdTimes" onclick ="CityTimes() " >
</body>
</html>
anyone?