ok i definitly am doing something wrong with the assignment of mine. i am new to javascript and have been trying to complete the assignment as named on http://srufaculty.sru.edu/david.dailey/cs130/week8.htm
but i cant seem to get the pictures to move to the right like the numbers
here is the code i have atm could someone tell me what i messed up?
so yeah the numbers work fine but i cant do images .....please help if anyone can cause this is due by midnight and i just cant figure it outCode:<HTML> <HEAD> <TITLE>Thing</TITLE> <SCRIPT LANGUAGE = "JavaScript"> function move() { X3=document.form.number3.value; X2=document.form.number2.value; X1=document.form.number1.value; document.number3.value=X2; document.number2.value=X1; document.number1.value=X3; A3=document.images"Img3"; A2=document.images"Img2"; A1=document.images"Img1"; document.images"Img3"=A2; document.images"Img2"=A1; document.images"Img1"=A3; } </SCRIPT> </HEAD> <BODY "this()"> <FORM NAME = "form"> <img src="1.gif" name = "img1"> <img src="2.gif" name = "img2"> <img src="3.gif" name = "img3"> <INPUT value="1" NAME = "number1"> <INPUT value="2" NAME = "number2"> <INPUT value="3" NAME = "number3"> <INPUT TYPE = "BUTTON" VALUE = "Click Here" onClick ="move()"></FORM> </BODY> </HTML>


Reply With Quote
Bookmarks