School Assignment - Create A Function That Prompts User For A Number

Oct 26, 2011

- Create a function that prompts user for a number.

- Develop the program so that it continues to prompt until it receives valid information.

- Then create a multiplication table that displays the number multiplied by 1 through prompted number.

How to get the function to work.

View 5 Replies


ADVERTISEMENT

Create A Function That Prompts User For A Number

Oct 26, 2011

Create a function that prompts user for a number. Develop the program so that it continues to prompt until it receives valid information. Then create a multiplication table that displays the number multiplied by 1 through prompted number.

View 6 Replies View Related

Create A Script That Allows User To Enter A Number?

Sep 29, 2009

I need to create a script that allows a user to enter a number, in either celsius or fahrenheit textbox....then they can click the button and the conversion is placed in the blank textbox

C = (F 32) * 5 / 9
F = C * 9 / 5 + 32

<table border="1">
<tr>
<th>Fahrenheit</th>
<th></th>

[Code]....

View 1 Replies View Related

Multiple Prompts>formulas>answer | Performing Trig Based On Prompts?

Mar 26, 2009

I am trying to set up a simple web page that requests two inputs and upon these input, determines and angle (basically taking a Spur Gear Pitch � and threads pitch to get a cam angle). Here is what I have but it is not working. I actually want it to work onClick of a button but I can deal with that later. I just am not sure how to get this to work properly.

<html>
<head>
<script language="JavaScript"><!--
function getCirc(dia){
return dia*Math.PI;
}
function getRad(x,y){
[Code]....

View 4 Replies View Related

Form Confirmation - Validated Prompts The User If The Details Are Correct

Nov 15, 2011

Have made a contact form for a website that uses javascript to validate it then once validated prompts the user if the details are correct. Currently its working in chrome and ie but not in firefox. Code is in post #3.

View 5 Replies View Related

Function Invocation In Response To A Property Assignment

Feb 17, 2007

I would like to be able to take some action (implemented in a
function) when a property is assigned a new value (much a page is re-
rendered when, for example, a style is changed). So if I do ...

myObject.myProperty = 5;

I want myObject.myFunction to be called. Is this possible at all?

View 1 Replies View Related

Script That Is Supposed To Check If A Number The User Guesses Is The Same As The Randomly Generated Number?

Nov 11, 2011

I have this script that is supposed to check if a number the user guesses is the same as the randomly generated number.Problem is that the random number generated at the start of the program keeps on changing everytime I click on the "Check if I'm right" button, the random number gets generated again and I never ever get to reach the correct answer

HTML CODE
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

[code].....

View 3 Replies View Related

JQuery :: Create A Function To Show A Custom Message As A Tooltip When A User Hovers Over A Table Row

Mar 10, 2011

I'm trying to create a function to show a custom message as a tooltip when a user hovers over a table row.

My tr tag looks like this

The javascript function looks like this:

jQuery seems to be loaded correctly, as I get the alert. I don't get the tooltip, however.

What I'm trying to do, in case this is totally retarded and impossible to see, is to hover a tooltip over the clicked row instead of passing it in as a variable.

View 8 Replies View Related

School Fee Calculator For Parents?

Jan 9, 2011

I would like to create a calculator which can help parents when they calculate their student's school fees on our school's joomla web site. Ive attached our school's fee table.

View 1 Replies View Related

Make A 2-d School Schedule From An Array?

Jan 2, 2011

How would a make a 2-D school schedule? The first row should have in it the days of the week and the first column should have the number of periods. The array should be 6 x 12. And how would I be able to ask the user what day/period they would like to know the schedule for? For example if they wanted to know what class was mondays 3rd period it would say math.

View 2 Replies View Related

Change Colour - Display School Timetable - Read The Current Time

Jun 2, 2010

So I have to display my school timetable, read the current time, and using javascript highlight the current lesson.

My teacher says i must use about 3/4 functions not switch cases.

View 6 Replies View Related

Alert & Prompts

Jul 20, 2005

Is there a way to modify the font in the alert & prompts windows?

View 1 Replies View Related

Add If Statement To Limit Number Input By User To Less Than 20?

Oct 29, 2009

How would I add an if statement to limit the number input by the user to less than 20?

View 4 Replies View Related

Create A Script That Will Increment A Number By 0.01?

Feb 12, 2011

working on building a website at the moment. and i need to create a script that will increment a number by 0.01, then stop and decrease by 0.03, then increase again by one. I wrote code to increment by 0.01 continuouly but now i can't stop it. and change to decreasing

<script type = "text/javascript">
num = 0.87;
var tim = 0;

[code]....

View 2 Replies View Related

Create Random Number Between 1 - 50 With Decimals?

May 24, 2011

How would I go about creating a random number between 1-50 that COULD include whole numbers, decimals to the tenth, hundredth and the thousandth place?
Ex) 2.145, 3, 5.8, 41.002, 10.12, 7, 18.023, 33.2

Also, if the only way to do it is to put trailing zeros to the thousandth place that's fine as well
Ex) 2.145, 3.00, 5.800, 41.002, 10.120, 7.00, 18.023, 33.200

View 7 Replies View Related

Mac / Firefox - Verify That A User Has Entered A Number Between 0 And 99 In A Form

Jun 24, 2011

I use the following to verify that a user has entered a number between 0 and 99 in a form:

It seems to work fine in all browser / machine combos except Firefox on a Mac, when entering 0 returns false (I don't know if entering other numbers also returns false.)

View 3 Replies View Related

Making A Diamond With Number Of Stars That User Inputs?

Oct 26, 2011

I'm new here, and I'm a programming newb but am very interested in learning and possibly pursuing programming in the future. As such, I'm taking an intro to Javascript class at my university, and our homework is to make a function that when called upon makes a diamond out of *'s. It is supposed to do so by prompting a user for an int and then makes a diamond shaped object with the inputted number of stars in the middle of the diamond. an example of what this would look like (if a user entered in "5" to the prompt):

[Code]...

View 1 Replies View Related

Validate That User Has Entered A Ten Digit Number Into The Text Box?

Mar 18, 2011

I need to validate that the the user has entered a ten digit number into the text box, and need some help with the code. Here is what I have:

<html>
<head>
<title>Checking with RegExp</title>
</head>

[Code].....

View 6 Replies View Related

Accept Two Numbers From A User And Will Determine Whether The Second Number Is A Factor Of The First

Oct 23, 2011

I have been presented with: Draw a flowchart and write a javascript program which will accept two numbers from a user and will determine whether the second number is a factor of the first. This is determined by dividing the first number by the second and checking if the remainder is 0. This is made easier if you find out what the operator does. The output should be in the form 4 is not a factor of 6 and 3 is a factor of 6. I have tried a few attemps and yet still not sure what the problem is :confused:

[Code]....

View 6 Replies View Related

Create An Array Of Numbers Counting From 1 To A Given Number?

Mar 20, 2009

I just want to create an array of numbers counting from 1 to a given number.

At the moment I have the for loop running like this:

var i=0;
for (i=1;i<=10;i++)
{
if (i == 1)

[Code]....

This outputs 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

How can I put this output into this variable: 'var ids' so I get out

var ids= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

View 4 Replies View Related

Create Phone Number Form Script?

Nov 30, 2009

How do i create a phone number form box in javascript using no inner html . there must be at least one dash in it. code...

View 3 Replies View Related

SIMPLE PROGRAM: User Enters Number, Gets Personal Message

Jul 23, 2005

I am trying to put up a page for my students for them to be able to enter
their class number into a field and instantly get a personalized text
message. (ie student number 5 enters "5" and gets a message like
"Congratulations on your homerun in Kickball Bobby!"

View 5 Replies View Related

Allow User To Input A Number Say 1-200 And That Variable Would Make Up The Last Part Of An IP Address

Feb 5, 2011

I need to get a piece of code that will allow me to have a user input a number, say 1-200 and that variable would make up the last part of an IP Address that the user wants to browse to.

192.168.0.[variable]

Is there a script that will allow me to do that?

View 1 Replies View Related

Can't Show A Text - Number , Character To User When I Load Page / Fix It?

Jul 26, 2009

I have a character countdown that tell you how many characters you have type in the text area. But I am having a problem, I can't see to show a text or the number the character the user when I load the page. I want it to show Characters Type: 0 when you load the page, and not having to press a key to show it, here is the code I am using...

onload="storeCaret(this);"

View 3 Replies View Related

Create A Water Bill That Calculates The Number Of Gallons

Mar 15, 2010

I have a javascript class and one of the assignements that we had to do was create a water bill that calculates the number of gallons used and the price for the water consumption. It will not work at all...

View 7 Replies View Related

How To Create A Random 15 Letter/number Piece Of Text?

Nov 10, 2005

How do I create random 15 letter/number piece of text that is composed of letter and numbers jumbled together then automatically place that in a field? This is all of course activated by a link.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved