Why Can't Enter A 2 Digit Number
Apr 30, 2010
I've wrote a very similar function that works perfect but no matter what i do here, the result is always the same. I can't seem to enter a 2 digit number in the second box for weight and therfore won't work. It seems to work fine for up to 9 lbs though.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
[Code]....
View 8 Replies
ADVERTISEMENT
Oct 27, 2009
I'm trying to replace each digit of a 4 digit integer by( the sum of that digit plus 7) modulus 10. And then swap the first and third digits and swap the second and fourth digits.this is what i have come up with so far and I cannot get it work.
<html xmlns = "http:www.w3.org/1999/xhtml">
<head>
<title>Encryption</title>
[code]....
View 7 Replies
View Related
Jul 6, 2009
I am trying to send a form value (a 15 digit number) to an external URL, so that the URL populates with the form value and opens in a new window when the user hits submit on the form.
The external URL that the form links to is in this format:[url]
Is there a piece of JS I can use that will populate the ORDERNUMBER field with the 15 digit form value when the user hits submit?
View 4 Replies
View Related
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
Oct 20, 2009
way of converting a single digit day to a double digit day. For example, I have date1 = 5 and I want that to be 05.
View 1 Replies
View Related
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
Dec 9, 2009
I have to do a project to figure out a person's grade. I am having trouble though, the user has to enter the number of exams, projects, etc. so it cannot be set. How would I do this with arrays? i.e., if I made it exams = new Array(4), this would limit the person to 4 exams even if he/she has more they want to enter in.
View 2 Replies
View Related
Feb 22, 2010
Im trying to pass one variable as 20* and after that im trying to check whether any special characters exist or not. But 20* cant be converting to string. It is giving script error.because of that my validation goes wrong.
if i pass "20*" as input ( with quotes) , validations working fine. how to convert string if it is 20*
i tried new String() finction and adding "" to that varible. But it is not working.
View 2 Replies
View Related
Feb 8, 2010
I am working on a javascript code for validating phone numbers against 0's.The scenario is that, 1 ) If the phone number contains all 0's in it, an error message is displayed. Eg. 0, 0000, 000-000-0000, 000,0000000000 etc..2 ) Phone number should only take digits [0-9] and some delimiters ()-,.+ "All other alphabets and special characters are not allowed.Eg. 01, 102-125-0214, etc.. ( allowed ) sjjlkjkj, xllfs -09-49- ( not allowed )3 ) The code I have written is as below -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
[code].....
View 3 Replies
View Related
May 4, 2011
I have a program in which a user must enter number of books and price and then calculate the total cost of the items, i have tried and tried to get it working to no effect can anyone see where i have went wrong.
View 2 Replies
View Related
May 14, 2010
hours = 59;
int num1 = hours / 10;
int num2 = hours % 10;
[code]....
View 1 Replies
View Related
Jul 20, 2005
<input type="button" onClick="doSomething()">
When the user click HTML button, it will launch doSomething(). But I
want the user enter ENTER key, it will have same effect.
View 1 Replies
View Related
Feb 12, 2003
I am using the following Javascript to print the year, but I would like it to just have "03" instead of "2003". Can somebody tell me how to do this? I've tried searching several different sites and I can't figure out how to do this.
document.write(now.getFullYear());
View 4 Replies
View Related
Feb 10, 2006
Here is what I'm trying to do. I have a 12-digit
(UPC-A) javascript validation script which works great. All I need now
is a similar script for 8-digit (UPC-E) type script? I don't want to
convert it to a 12-digit UPC-A before validating it as a 12-digit
number. I would prefer to just be able to calc the number, as an
8-digit number, check digit and all, just like I am currently doing
successfully with this 12-digit validation script: Code:
View 3 Replies
View Related
May 18, 2011
I am creating a JS function that takes a time input in minutes only and divides that number by an inputted digit. I would like to know how we use Javascript to convert that result into minutes and seconds.For instance, 30 (1800 seconds) divided by 4 = 450 seconds. How do I show that as 7:30? I can divide by 60 to get 7.5, but I don't know how to go from there. I got as far as the following, then got stuck.
PHP Code:
<form id="form2"><table>
<tr>
<td class="alignright">
[code].....
View 24 Replies
View Related
Apr 16, 2011
I want to create script which accept only numeric digit in textbox when user type alphabets nothing will appear in textbox and display error.
View 3 Replies
View Related
Apr 25, 2011
Generate a series of 13 digit numbers and output them to a text file.
View 27 Replies
View Related
Oct 31, 2010
I am trying to extract just a single digit character from a string.
my string is 'constructions-01_0'
I want to extract the very last character, the 0.
how do I do this?
Should I use String.match() or String.split() methods or is there another method I shoud use?
And what should the regExp be to get that last digit?
also separately I want to get the double digit and put that into another string, the 01.
How do I extract just that bit?
View 6 Replies
View Related
Oct 15, 2009
i am wanting to validate an input field to only validate if 6 numbers are entered
I am reading Simply JS book and can't seem to find anything about that.
View 2 Replies
View Related
Oct 13, 2009
a.) specify two parameters for the changeYear function: today and holiday.
function changeYear(today)(holiday){
b.) in the first line of the above function, use the getFullYear() date method to extract the 4-digit value from the today variable and store the value in a variable named year.
first line
c.) in the second line; use the setFullYear() date method to set the full year of the holiday date object to the value of the year variable.
second line
d.) in the third line, use a conditional operator on the year variable. The test condition is whether the value of the holiday date object is less than the today date object. If it is, this means that the event has already passed in the current year and the value of the year variable should be increased by 1.
third line
e.) in the fourth line of the function, again set the full year value of the holiday date object to the value of the year variable.
View 3 Replies
View Related
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
Feb 20, 2010
Hello everyone... I've got a question about an onKeyUp event. I'm using a text box that HAS to be a negative number therefore it has to have a - sign in front of the number. Can someone point me in the right direction as to how to write a function to do this? Thanks so much...
View 5 Replies
View Related
May 5, 2011
I am working on trying to create a Picture Bingo JavaScript. I am using the standard Bingo Card Generator and it works great however, I need help coding the script so that the number are associated with a picture for example everytime number 12 would show up on the card an image would replace the number. Here is the code that I am using:
[Code]...
View 1 Replies
View Related
Jun 16, 2011
When updating our agency's webpage daily, [URL] I am looking for a shortcut to save time.. When I update air quality numbers. I have to put the conditions. Ex.. 50 = good 100= moderate etc etc. As you see here(bold and underlined)
[Code]...
Well instead of having to type good or moderate every-time to correlate with the numbers, I want to find a way the category can automatically default correctly when I put in just the number. Ex, if I put in the number 100, it automatically knows to issue/ put Moderate with out me having to type it. I semi wrote a code .. Yet can't seem to know how to execute. Seeing if Maybe I can get some assistance.
[Code]...
View 4 Replies
View Related
Nov 29, 2011
I have a function below where every time a question is submitted, it will add a new row in the table with a textbox which allows numbers entry only. My question is that I don't know how to code these features in this function:
I want the text box to be between 0 and 100, so if text box contains a number which is above 100, it will automatically change the number to the maximum number which is 100.
Does any one know how to code this in my function below in javascript:
Code:
View 1 Replies
View Related
Jul 7, 2011
When I used toFixed() method on a number, I thought that this method round a number to a specified approximation, but I got a surprising result, the number became string! 15.23689.toFixed(2) ==> "15.24". So does it convert the number into string?
View 6 Replies
View Related