473,383 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

can anyone correct this programme ?

<HTML>
<HEAD> userinput (i)
<TITLE>Enter a number </TITLE>
<SCRIPT language="JavaScript" >
var userInput;
var userNumber;
var upperLimit = 20;
userInput = window.prompt('Please enter a number in
the range 1 to ' + upperLimit,'');
userNumber = parseFloat(userInput);
while ((userNumber <= 1) || (userNumber >=
upperLimit))
{
UserInput = window.prompt('Please re-enter - number
should be in range 1 to + upperLimit, '')
}
document.write('<BR>'+'Your chosen number was ' +
yourNumber)
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>

os windows xp, source code java script.
Apr 19 '07 #1
2 933
having trouble any help would be appriceiated
Apr 19 '07 #2
acoder
16,027 Expert Mod 8TB
You need to add
Expand|Select|Wrap|Line Numbers
  1. userNumber = parseFloat(userInput);
in your while loop.

Also, remember Javascript is case-sensitive.
Apr 20 '07 #3

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

Similar topics

0
by: cm012b5105 | last post by:
Hello i want to put an interactive text programme in to a graphical box this is a small section of my text programme s = raw_input ("Hello whats your name? ") if s=='melvyn': print "your my...
0
by: melledge | last post by:
Full Programme for XTech 2005 Announced Premier European XML Industry Event Expands Focus to "XML, the Web and Beyond"; Co-hosted by the Mozilla Foundation,W3C, and OASIS, Presenters Include...
2
by: NDAKI MBOULET | last post by:
J'ai un problème pour écrire un programme. Voici mon sujet: Ecrire en c++ un programme qui reçoit en entrée une suite d'instruction encadrées par les mots clés BIBODLE et LISUK dans un langage...
1
by: Kennington23 | last post by:
design and write a programme to print a table of powers. the table should read in 3 values, the base, the minimum exponent, the maximum exponent. it must then print a table with 1 column for the...
6
by: =?ISO-8859-1?Q?FERHAT_A=C7ICI?= | last post by:
hi everyone...I want to run any programme or file with my programme.example any file or programme, like this "xxx.ncn".I want If users double click this xxx.ncn this file can run by my...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.