script help

This is a discussion on "script help" within the JavaScript Forum section. This forum, and the thread "script help are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 13th, 2007, 12:29
New Member
Join Date: Nov 2007
Location: Israel
Age: 36
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question script help

I have this script
HTML: Select all
<html dir="ltr"> 

<head> 
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> 
<title>New Page 1</title> 
</head> 

<body> 
<HTML><HEAD> 
<SCRIPT> 
var img0 = new Image( 200,250 ); 
img0.src = "Untitled-3.jpg" ; 

var img1 = new Image( 200,250 ); 
img1.src = "Untitled-4.jpg"; 

var img2 = new Image( 200,250 ); 
img2.src = "Untitled-6.jpg"; var i = 0; 
var nbImg = 3; // change to the number of different images you have 
function animate() { 
document.images[0].src = eval("img" + i ).src; 
i++; 
if (i == nbImg) i=0; 
junk = setTimeout("animate();", 3000); // in milliseconds 
} 
</SCRIPT> 
</HEAD><BODY onLoad="animate();"> 
<IMG src="" width=200 height=250> 
</BODY></HTML> 

</body> 

</html> </b>
How can I make a link to each of the photo I put....? (you can see this in the blue color)
I need that to every photo will have a different link...where do I put this link on the script (link for example - http://www.cnn.com)?


Last edited by c010depunkk; Nov 13th, 2007 at 13:11. Reason: use [HTML] tags when posting HTML
Reply With Quote

  #2 (permalink)  
Old Nov 13th, 2007, 12:31
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: script help

Moving to JS forum.
Reply With Quote
  #3 (permalink)  
Old Nov 13th, 2007, 13:15
c010depunkk's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: script help

Well, first of all you have multiple <html> <head> and <body> tags. Start by fixing that.

Then, try to explain your question a bit more clearly.....

If you just want to add more images, then all you have to do is declare more "imgX" variables and change the "nbImg" variable like it says in the comments.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with this script korvix JavaScript Forum 1 May 28th, 2008 23:00
Just following the script... chrisomatix Introduce Yourself 3 Feb 27th, 2008 07:03
i need help with a FMS script taietel Flash & Multimedia Forum 1 Apr 6th, 2007 14:56
Asp script tolis Classic ASP 0 Feb 3rd, 2007 13:28
Changes to CSS script Accurax Web Page Design 6 Dec 17th, 2006 16:36


All times are GMT. The time now is 19:24.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43