Forum : Not understanding the Error
Brief description  about Online courses   join in Online courses
View Rajagopalan  Nambiar 's Profile

Not understanding the Error

Please let me know what is wrong in the following script?
=========================
<script language="javascript" type="text/javascript">
function shift() {
Gen = new Array(7);
Gen[0] = document.frmArray2.txtOne.value;
Gen[1] = document.frmArray2.txtTwo.value;
Gen[2] = document.frmArray2.txtThree.value;
Gen[3] = document.frmArray2.txtFour.value;
Gen[4] = document.frmArray2.txtFive.value;
Gen[5] = document.frmArray2.txtSix.value;
Gen[6] = document.frmArray2.txtSeven.value;
Gen.shift();
document.frmArray2.txtFinal.value = Gen;
}
</SCRIPT>
</head>
<body>
"Q2: SHIFTING AN ARRAY"<P>
<FORM NAME = frmArray2>
1. <INPUT TYPE = Text NAME = txtOne SIZE = 5 value ="">
2. <INPUT TYPE = Text NAME = txtTwo SIZE = 5 value ="">
3.<INPUT TYPE = Text NAME = txtThree SIZE = 5 value ="">
4.<INPUT TYPE = Text NAME = txtFour SIZE = 5 value ="">
5.<INPUT TYPE = Text NAME = txtFive SIZE = 5 value ="">
6.<INPUT TYPE = Text NAME = txtSix SIZE = 5 value ="">
7.<INPUT TYPE = Text NAME = txtSeven SIZE = 5 value ="">
<P>
<Input Type = Button NAME = b1 VALUE = "SHIFT" onClick = shift()>
<P>
Result: <INPUT TYPE = Text NAME = txtFinal SIZE = 30 value = "">
</FORM>
</body>
</html>
Asked by Rajagopalan Nambiar | Jul 12, 2010 |  Reply now
Replies (2)
View rajagopalan nambiar 's Profile
Hi, thanks for the response. In fact there was no error - sorry for posting the query. The only issue was (ifeel) that I was trying many scripts on the same page and somewhere it all was getting messed up.
Error regretted. Raj
Jul 19, 2010
View teacher siliconindia 's Profile
Hi Rajagopalan,

I did not get your problem . What is the question? and What is the error?
Jul 14, 2010