javascript
Brief description  about Online courses   join in Online courses
View ashish  sinha 's Profile

javascript assignment 5

please tell me why this code is not working
=================

<HTML>
<HEAD>
<TITLE>Insysd</TITLE>
<script type="text/javascript">

function six()
{
x=document.form1.txt3.value;

for(i=0;i<x;i )
{
for(j=1;j<=i;j )
document.write(j "
Asked by ashish sinha | Sep 23, 2010 |  Reply now
Replies (2)
View bharat c bhagat-pmp 's Profile
PL try following

<html>
<head>
<title> Assignment 25 Task3 </title>
</head>
<body>

<h3 Align=Center><u> Assignment 25 Task3 Pattern Generation </u></b>
<p>

<FORM NAME = "Pattern">

Type in your Num1, then click the button: </h3>
<p>
<INPUT TYPE = Text NAME = PNumber Size = 15> </p>

<INPUT TYPE = Button NAME = "b1" VALUE ="Pattern Printer" onClick = message()>

</FORM>

<SCRIPT language = "javascript">


function message() {

Num1 = document.Pattern.PNumber.value
if (Number(Num1)) { Num1 = Number(Num1)
document.Pattern.PNumber.value = Num1 }
//else { alert("Please enter a number more than 2 but not exceeding 10 in box") }

if (Num1 < 9 && Num1 > 2){
ConfirmStatus = confirm("Are u sure?")
if (ConfirmStatus == true) {
alert("Your Selected Number is " + Num1)

for(i=0; i<Num1; i++)
{
for(j=1; j<=i; j++)
document.write(j+"&nbsp;&nbsp;");
document.write("<br />");
}

for(i=Num1; i>0; i--)
{
for(j=1; j<i ; j++)
document.write(j+"&nbsp;&nbsp;");
document.write("<br />");
}

alert(" Now Enter A New Number for the same pattern ") }
if (ConfirmStatus == false) {
alert("Please Re Enter.") }


}


else
alert("Please enter a valid Integer larger than 2 and not exceeding 9 in boxes")
}

</SCRIPT>
<hr>
Assignment 25 Task 3 Pattern Generatin Under Development by Bharat C Bhagat


</body>
</html>
Jul 6, 2011
View ashish sinha 's Profile
<HTML>
<HEAD>
<TITLE>Insysd</TITLE>
<script type="text/javascript">

function six()
{
x=document.form1.txt3.value;

for(i=0;i<x;i++)
{
for(j=1;j<=i;j++)
document.write(j+"&nbsp;&nbsp;");
document.write("<br/>");
}


for(i=x;i>0;i--)
{
for(j=1;j<i;j++)
document.write(j+"&nbsp;&nbsp;");
document.write("<br/>");
}

}


</script>
</HEAD>

<BODY>

<FORM NAME="form1">
Enter a number: <input type=text name=txt3 value="" /><br/><br/>
<input type=button value=DISPLAY onclick=six()/>
</FORM>
</BODY>
</HTML>
Sep 23, 2010