Click here to Skip to main content
15,894,315 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Error in developing my first AJAX example. . . . Pin
moocr.com1-Nov-10 15:49
moocr.com1-Nov-10 15:49 
QuestionRetrieving data from an access database and show it to the user. Pin
gamer112711-Oct-10 3:04
gamer112711-Oct-10 3:04 
AnswerRe: Retrieving data from an access database and show it to the user. Pin
Eddy Vluggen14-Oct-10 6:45
professionalEddy Vluggen14-Oct-10 6:45 
AnswerRe: Retrieving data from an access database and show it to the user. Pin
Sanket898924-Oct-10 8:24
Sanket898924-Oct-10 8:24 
AnswerRe: Retrieving data from an access database and show it to the user. Pin
V.25-Oct-10 4:15
professionalV.25-Oct-10 4:15 
QuestionMove items up and down in listBox Pin
Member 32222648-Oct-10 4:55
Member 32222648-Oct-10 4:55 
AnswerRe: Move items up and down in listBox Pin
Not Active8-Oct-10 5:27
mentorNot Active8-Oct-10 5:27 
Questionmathematics tables Pin
yumss5-Oct-10 9:05
yumss5-Oct-10 9:05 
hey plz help me i tried to make o program in which user inputs a number between 1 to 10 and its table appears..but i its not working properly..when i press a number table of 2 prints every time.
plz help me in finding mistake.thnks



<html>
<title> :Tables: </title>
<head>
<script type = "text/javascript">
function disp_promt()

{


}
</script>
</head>
<body>
<h2> TABLES USING FOR LOOP </h2>

<script type = "text/javascript">
var number = prompt("Please enter a number between 2 to 10", "")

if (number=2)
{
for (num=1; num<=10; num++)
{
document.write("2 x " + num + "=" + 2*num + "<br>");

}
}


else if (number=3)
{
for (num=1; num<=10; num++)
{
document.write("3 x " + num + "=" + 3*num + "<br>");

}
}

else if (number=4)
{
for (num=1; num<=10; num++)
{
document.write("4 x " + num + "=" + 4*num + "<br>");

}
}

else if (number=5)
{
for (num=1; num<=10; num++)
{
document.write("5 x " + num + "=" + 5*num + "<br>");

}
}

else if (number=6)
{
for (num=1; num<=10; num++)
{
document.write("6 x " + num + "=" + 6*num + "<br>");

}
}

else if (number=7)
{
for (num=1; num<=10; num++)
{
document.write("7 x " + num + "=" + 7*num + "<br>");

}
}

else if (number=8)
{
for (num=1; num<=10; num++)
{
document.write("8 x " + num + "=" + 8*num + "<br>");

}
}

else if (number=9)
{
for (num=1; num<=10; num++)
{
document.write("9 x " + num + "=" + 9*num + "<br>");

}
}

else if (number=10)
{
for (num=1; num<=10; num++)
{
document.write("10 x " + num + "=" + 10*num + "<br>");

}
}

else
{
document.write("You haven't entered a number between 2 to 10");
}
</script>
</body>
</html>
AnswerRe: mathematics tables PinPopular
NeverHeardOfMe5-Oct-10 9:25
NeverHeardOfMe5-Oct-10 9:25 
AnswerRe: mathematics tables Pin
PavanPabolu10-Oct-10 19:22
PavanPabolu10-Oct-10 19:22 
AnswerRe: mathematics tables Pin
PavanPabolu10-Oct-10 19:24
PavanPabolu10-Oct-10 19:24 
AnswerRe: mathematics tables Pin
PavanPabolu10-Oct-10 19:25
PavanPabolu10-Oct-10 19:25 
Questionstring testing fails Pin
SummerBulb4-Oct-10 21:51
SummerBulb4-Oct-10 21:51 
AnswerRe: string testing fails Pin
NeverHeardOfMe4-Oct-10 22:41
NeverHeardOfMe4-Oct-10 22:41 
AnswerRe: string testing fails Pin
moocr.com1-Nov-10 15:55
moocr.com1-Nov-10 15:55 
Questionreloading pages from other windows Pin
Aptiva Dave4-Oct-10 10:09
Aptiva Dave4-Oct-10 10:09 
AnswerRe: reloading pages from other windows Pin
Karthik. A4-Oct-10 10:16
Karthik. A4-Oct-10 10:16 
GeneralRe: reloading pages from other windows Pin
Aptiva Dave4-Oct-10 10:19
Aptiva Dave4-Oct-10 10:19 
GeneralRe: reloading pages from other windows Pin
Karthik. A4-Oct-10 10:41
Karthik. A4-Oct-10 10:41 
AnswerRe: reloading pages from other windows Pin
Gerben Jongerius6-Oct-10 3:15
Gerben Jongerius6-Oct-10 3:15 
QuestionHTTPs Headers Pin
wenlong883-Oct-10 23:40
wenlong883-Oct-10 23:40 
AnswerRe: HTTPs Headers Pin
Richard MacCutchan4-Oct-10 0:53
mveRichard MacCutchan4-Oct-10 0:53 
QuestionHow to read the body of methods in JavaScript Pin
sainath4373-Oct-10 19:20
sainath4373-Oct-10 19:20 
GeneralRe: How to read the body of methods in JavaScript Pin
Sunasara Imdadhusen4-Oct-10 2:45
professionalSunasara Imdadhusen4-Oct-10 2:45 
AnswerRe: How to read the body of methods in JavaScript Pin
Karthik. A4-Oct-10 10:18
Karthik. A4-Oct-10 10:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.