1

Greetings all: Here is my simple code, Why is my javascript showing up as text on my page? any help would greatly appreciated, also any tips would be appreciated. thank you in advance

<html>
<head><title>jsn massage - home page</title>
<script type="text/javascript">
var image1 = new Image()
image1.src = "images/100_0350a.jpg"
var image2 = new Image()
image2.src = "images/circle.jpg"
var image3 = new Image()
image3.src = "images/AddisonStudioI.jpg"

</script>
</head>
<body>
<img src="images/100_0350a.jpg" name="slide" width="400" height="400>
<script type="text/javascript">

var step=1;
function slideit()
{
document.images.slide.src=eval("image"+step+".src");
if(step<3)
step++;
else
step=1;
setTimeout("slideit()", 2500);
}
slideit();
</script> 
</body>
</html>

4 Answers 4

1

You forgot to put a closing quote on height="400"

<img src="images/100_0350a.jpg" name="slide" width="400" height="400"/>
Sign up to request clarification or add additional context in comments.

1 Comment

wow... thank you so much!! I knew it had to be something stupid like that. it always takes someone else to notice.
1

Your height attribute is missing the closing quotation mark and the img tag should be closed properly.

<img src="images/100_0350a.jpg" name="slide" width="400" height="400"/>

Comments

1
<img src="images/100_0350a.jpg" name="slide" width="400" height="400>

You should properly close this.

<img src="images/100_0350a.jpg" name="slide" width="400" height="400" />

Comments

0

Add this code in css

script { display: none !important; }

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.