How do I get code to access the images at the URL given?
I'd like the user to be able to select which theme of images they want to view then the script would randomly pick an image to show. - <!--BEGIN
-
// Customising Variables
-
-
// Arrays of Images that can be used in the game
-
var ImgAry=['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg','7.jpg','8.jpg','9.jpg','10.jpg','11.jpg','12.jpg','13.jpg','14.jpg','15.jpg','16.jpg','17.jpg','18.jpg','19.jpg','20.jpg','21.jpg','22.jpg','23.jpg','24.jpg','25.jpg','26.jpg','27.jpg','28.jpg','29.jpg','30.jpg','32.jpg','33.jpg','34.jpg','35.jpg','36.jpg','37.jpg','38.jpg','39.jpg','40.jpg','41.jpg','42.jpg','43.jpg','44.jpg','45.jpg','46.jpg','47.jpg','48.jpg','49.jpg','50.jpg','51.jpg','52.jpg','53.jpg','54.jpg','55.jpg','56.jpg','57.jpg','58.jpg','59.jpg','60.jpg','61.jpg','62.jpg','63.jpg','64.jpg','65.jpg','66.jpg','67.jpg','68.jpg','69.jpg','70.jpg','71.jpg','72.jpg','73.jpg','74.jpg','75.jpg','76.jpg','77.jpg','78.jpg','79.jpg','80.jpg','81.jpg','82.jpg','83.jpg','84.jpg','85.jpg','86.jpg','87.jpg','88.jpg','89.jpg','90.jpg','91.jpg','92.jpg','93.jpg','94.jpg','95.jpg','96.jpg','97.jpg','98.jpg','99.jpg','100.jpg','101.jpg','102.jpg','103.jpg','104.jpg','105.jpg','106.jpg','107.jpg','108.jpg','109.jpg','110.jpg','111.jpg','112.jpg','113.jpg','114.jpg','115.jpg','116.jpg','117.jpg','118.jpg','119.jpg','120.jpg','121.jpg','122.jpg','123.jpg','124.jpg','125.jpg','126.jpg','127.jpg','128.jpg','129.jpg','130.jpg','131.jpg','132.jpg','133.jpg','134.jpg','135.jpg'];
-
var ImgAry2=['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg','7.jpg','8.jpg','9.jpg','10.jpg','11.jpg','12.jpg','13.jpg','14.jpg','15.jpg','16.jpg','17.jpg','18.jpg','19.jpg','20.jpg','21.jpg','22.jpg','23.jpg','24.jpg','25.jpg','26.jpg','27.jpg','28.jpg','29.jpg','30.jpg','32.jpg','33.jpg','34.jpg','35.jpg','36.jpg','37.jpg','38.jpg','39.jpg','40.jpg','41.jpg','42.jpg','43.jpg','44.jpg','45.jpg','46.jpg','47.jpg','48.jpg','49.jpg','50.jpg','51.jpg','52.jpg','53.jpg','54.jpg','55.jpg','56.jpg','57.jpg','58.jpg','59.jpg','60.jpg','61.jpg','62.jpg','63.jpg','64.jpg','65.jpg','66.jpg','67.jpg','68.jpg','69.jpg','70.jpg','71.jpg','72.jpg','73.jpg','74.jpg','75.jpg','76.jpg','77.jpg','78.jpg','79.jpg','80.jpg','81.jpg','82.jpg','83.jpg','84.jpg','85.jpg','86.jpg','87.jpg','88.jpg','89.jpg','90.jpg','91.jpg','92.jpg','93.jpg','94.jpg','95.jpg','96.jpg','97.jpg','98.jpg','99.jpg','100.jpg','101.jpg','102.jpg','103.jpg','104.jpg','105.jpg','106.jpg','107.jpg','108.jpg','109.jpg','110.jpg','111.jpg','112.jpg','113.jpg','114.jpg','115.jpg','116.jpg','117.jpg','118.jpg','119.jpg','120.jpg','121.jpg','122.jpg','123.jpg','124.jpg','125.jpg','126.jpg','127.jpg','128.jpg','129.jpg','130.jpg','131.jpg','132.jpg','133.jpg','134.jpg','135.jpg'];
-
var ImgAry3=['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg','7.jpg','8.jpg','9.jpg','10.jpg','11.jpg','12.jpg','13.jpg','14.jpg','15.jpg','16.jpg','17.jpg','18.jpg','19.jpg','20.jpg','21.jpg','22.jpg','23.jpg','24.jpg','25.jpg','26.jpg','27.jpg','28.jpg','29.jpg','30.jpg','32.jpg','33.jpg','34.jpg','35.jpg','36.jpg','37.jpg','38.jpg','39.jpg','40.jpg','41.jpg','42.jpg','43.jpg','44.jpg','45.jpg','46.jpg','47.jpg','48.jpg','49.jpg','50.jpg','51.jpg','52.jpg','53.jpg','54.jpg','55.jpg','56.jpg','57.jpg','58.jpg','59.jpg','60.jpg','61.jpg','62.jpg','63.jpg','64.jpg','65.jpg','66.jpg','67.jpg','68.jpg','69.jpg','70.jpg','71.jpg','72.jpg','73.jpg','74.jpg','75.jpg','76.jpg','77.jpg','78.jpg','79.jpg','80.jpg','81.jpg','82.jpg','83.jpg','84.jpg','85.jpg','86.jpg','87.jpg','88.jpg','89.jpg','90.jpg','91.jpg','92.jpg','93.jpg','94.jpg','95.jpg','96.jpg','97.jpg','98.jpg','99.jpg','100.jpg','101.jpg','102.jpg','103.jpg','104.jpg','105.jpg','106.jpg','107.jpg','108.jpg','109.jpg','110.jpg','111.jpg','112.jpg','113.jpg','114.jpg','115.jpg','116.jpg','117.jpg','118.jpg','119.jpg','120.jpg','121.jpg','122.jpg','123.jpg','124.jpg','125.jpg','126.jpg','127.jpg','128.jpg','129.jpg','130.jpg','131.jpg','132.jpg','133.jpg','134.jpg','135.jpg'];
-
var ImgAry4=['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg','7.jpg','8.jpg','9.jpg','10.jpg','11.jpg','12.jpg','13.jpg','14.jpg','15.jpg','16.jpg','17.jpg','18.jpg','19.jpg','20.jpg','21.jpg','22.jpg','23.jpg','24.jpg','25.jpg','26.jpg','27.jpg','28.jpg','29.jpg','30.jpg','32.jpg','33.jpg','34.jpg','35.jpg','36.jpg','37.jpg','38.jpg','39.jpg','40.jpg','41.jpg','42.jpg','43.jpg','44.jpg','45.jpg','46.jpg','47.jpg','48.jpg','49.jpg','50.jpg','51.jpg','52.jpg','53.jpg','54.jpg','55.jpg','56.jpg','57.jpg','58.jpg','59.jpg','60.jpg','61.jpg','62.jpg','63.jpg','64.jpg','65.jpg','66.jpg','67.jpg','68.jpg','69.jpg','70.jpg','71.jpg','72.jpg','73.jpg','74.jpg','75.jpg','76.jpg','77.jpg','78.jpg','79.jpg','80.jpg','81.jpg','82.jpg','83.jpg','84.jpg','85.jpg','86.jpg','87.jpg','88.jpg','89.jpg','90.jpg','91.jpg','92.jpg','93.jpg','94.jpg','95.jpg','96.jpg','97.jpg','98.jpg','99.jpg','100.jpg','101.jpg','102.jpg','103.jpg','104.jpg','105.jpg','106.jpg','107.jpg','108.jpg','109.jpg','110.jpg','111.jpg','112.jpg','113.jpg','114.jpg','115.jpg','116.jpg','117.jpg','118.jpg','119.jpg','120.jpg','121.jpg','122.jpg','123.jpg','124.jpg','125.jpg','126.jpg','127.jpg','128.jpg','129.jpg','130.jpg','131.jpg','132.jpg','133.jpg','134.jpg','135.jpg'];
-
var ImgAry5=['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg','7.jpg','8.jpg','9.jpg','10.jpg','11.jpg','12.jpg','13.jpg','14.jpg','15.jpg','16.jpg','17.jpg','18.jpg','19.jpg','20.jpg','21.jpg','22.jpg','23.jpg','24.jpg','25.jpg','26.jpg','27.jpg','28.jpg','29.jpg','30.jpg','32.jpg','33.jpg','34.jpg','35.jpg','36.jpg','37.jpg','38.jpg','39.jpg','40.jpg','41.jpg','42.jpg','43.jpg','44.jpg','45.jpg','46.jpg','47.jpg','48.jpg','49.jpg','50.jpg','51.jpg','52.jpg','53.jpg','54.jpg','55.jpg','56.jpg','57.jpg','58.jpg','59.jpg','60.jpg','61.jpg','62.jpg','63.jpg','64.jpg','65.jpg','66.jpg','67.jpg','68.jpg','69.jpg','70.jpg','71.jpg','72.jpg','73.jpg','74.jpg','75.jpg','76.jpg','77.jpg','78.jpg','79.jpg','80.jpg','81.jpg','82.jpg','83.jpg','84.jpg','85.jpg','86.jpg','87.jpg','88.jpg','89.jpg','90.jpg','91.jpg','92.jpg','93.jpg','94.jpg','95.jpg','96.jpg','97.jpg','98.jpg','99.jpg','100.jpg','101.jpg','102.jpg','103.jpg','104.jpg','105.jpg','106.jpg','107.jpg','108.jpg','109.jpg','110.jpg','111.jpg','112.jpg','113.jpg','114.jpg','115.jpg','116.jpg','117.jpg','118.jpg','119.jpg','120.jpg','121.jpg','122.jpg','123.jpg','124.jpg','125.jpg','126.jpg','127.jpg','128.jpg','129.jpg','130.jpg','131.jpg','132.jpg','133.jpg','134.jpg','135.jpg'];
-
var ImgAry6=['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg','7.jpg','8.jpg','9.jpg','10.jpg','11.jpg','12.jpg','13.jpg','14.jpg','15.jpg','16.jpg','17.jpg','18.jpg','19.jpg','20.jpg','21.jpg','22.jpg','23.jpg','24.jpg','25.jpg','26.jpg','27.jpg','28.jpg','29.jpg','30.jpg','32.jpg','33.jpg','34.jpg','35.jpg','36.jpg','37.jpg','38.jpg','39.jpg','40.jpg','41.jpg','42.jpg','43.jpg','44.jpg','45.jpg','46.jpg','47.jpg','48.jpg','49.jpg','50.jpg','51.jpg','52.jpg','53.jpg','54.jpg','55.jpg','56.jpg','57.jpg','58.jpg','59.jpg','60.jpg','61.jpg','62.jpg','63.jpg','64.jpg','65.jpg','66.jpg','67.jpg','68.jpg','69.jpg','70.jpg','71.jpg','72.jpg','73.jpg','74.jpg','75.jpg','76.jpg','77.jpg','78.jpg','79.jpg','80.jpg','81.jpg','82.jpg','83.jpg','84.jpg','85.jpg','86.jpg','87.jpg','88.jpg','89.jpg','90.jpg','91.jpg','92.jpg','93.jpg','94.jpg','95.jpg','96.jpg','97.jpg','98.jpg','99.jpg','100.jpg','101.jpg','102.jpg','103.jpg','104.jpg','105.jpg','106.jpg','107.jpg','108.jpg','109.jpg','110.jpg','111.jpg','112.jpg','113.jpg','114.jpg','115.jpg','116.jpg','117.jpg','118.jpg','119.jpg','120.jpg','121.jpg','122.jpg','123.jpg','124.jpg','125.jpg','126.jpg','127.jpg','128.jpg','129.jpg','130.jpg','131.jpg','132.jpg','133.jpg','134.jpg','135.jpg'];
-
var ImgAry7=['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg','7.jpg','8.jpg','9.jpg','10.jpg','11.jpg','12.jpg','13.jpg','14.jpg','15.jpg','16.jpg','17.jpg','18.jpg','19.jpg','20.jpg','21.jpg','22.jpg','23.jpg','24.jpg','25.jpg','26.jpg','27.jpg','28.jpg','29.jpg','30.jpg','32.jpg','33.jpg','34.jpg','35.jpg','36.jpg','37.jpg','38.jpg','39.jpg','40.jpg','41.jpg','42.jpg','43.jpg','44.jpg','45.jpg','46.jpg','47.jpg','48.jpg','49.jpg','50.jpg','51.jpg','52.jpg','53.jpg','54.jpg','55.jpg','56.jpg','57.jpg','58.jpg','59.jpg','60.jpg','61.jpg','62.jpg','63.jpg','64.jpg','65.jpg','66.jpg','67.jpg','68.jpg','69.jpg','70.jpg','71.jpg','72.jpg','73.jpg','74.jpg','75.jpg','76.jpg','77.jpg','78.jpg','79.jpg','80.jpg','81.jpg'];
-
-
-
-
// The SelAry is used to populate the Select Images SelectList
-
var SelAry=[];
-
// Each field is an array defining an option
-
// field 0 = the text to be displayed in the option
-
// field 1 = the directory path for the images
-
// field 2 = the image file names]
-
SelAry[0]=[];
-
SelAry[1]=['The Pilot Episode','http://i107.photobucket.com/albums/m287/tpkyteroo/zgames/memory/pilot1/',ImgAry];
-
SelAry[2]=['The Origin Story','http://i107.photobucket.com/albums/m287/tpkyteroo/zgames/memory/tos1/',ImgAry2];
-
SelAry[3]=['The Culex Experiment','http://i107.photobucket.com/albums/m287/tpkyteroo/zgames/memory/tce1/',ImgAry3];
-
SelAry[4]=['Monsoon Man','http://i107.photobucket.com/albums/m287/tpkyteroo/zgames/memory/mm1/',ImgAry4];
-
SelAry[5]=['The Rameses Connection','http://i107.photobucket.com/albums/m287/tpkyteroo/zgames/memory/trc1/',ImgAry5];
-
SelAry[6]=['The Living Stones','http://i107.photobucket.com/albums/m287/tpkyteroo/zgames/memory/tlstones1/',ImgAry6];
-
SelAry[7]=['Audio Series','http://i107.photobucket.com/albums/m287/tpkyteroo/zgames/memory/audio1/',ImgAry7];
-
-
-
var j = 0
-
var q = ImgAry.length;
-
-
var preBuffer = new Array()
-
for (i = 0; i < q; i++){
-
preBuffer[i] = new Image()
-
preBuffer[i].src = ImgAry[i]
-
}
-
-
var whichImage = Math.round(Math.random()*(q-1));
-
function showImage(){
-
document.write('<img src="'+ImgAry[whichImage]+'" width=\"640\" height=\"456\">');
-
}
-
-
-
// End -->
-
</script>
18 1635 iam_clint 1,208
Recognized Expert Top Contributor
I guess i really don't understand your question you showed code whats wrong with the code?
iam_clint 1,208
Recognized Expert Top Contributor -
function showImage(whichstyle){
-
var style = SelAry[whichstyle];
-
style = style[1];
-
document.write('<img src="'+style+ImgAry[whichImage]+'" width=\"640\" height=\"456\">');
-
}
-
-
// End -->
-
</script>
-
<input type="button" onclick="showImage(1);" value="click me!">
-
you mean something like this?
I can't get any images to show up. I'm trying to get the code to recognize the array and recognize the image URL. I'm attempting to make it so the JS is on its own page and is called to the html page.
The user would have a menu to select a theme from. I've not put that code in yet, forgot. Babysitting and new to JS = Confusion. LOL Thanks! The Link to page
This is what I did on another page: Page 1
The images show up, but don't use an image array I like. I'd rather just use images array whereby I only have to change the link and title to get what I want, which is why I copied code from a memory game.
Better idea: Forget selecting the theme from within the page. Instead, use simple html link to theme instead of selection box that doesn't work.
Use page 1 script. But, alter it to handle Arrays in this format: -
var ImgAry=new Array();
-
// Each field is an array defining an option
-
// field 0 = the directory path for the images
-
// field 1 = the image file names
-
// field 2 = width and height]
-
ImgAry[0]=['http://i107.photobucket.com/albums/m287/tpkyteroo/zgames/memory/tlstones1/',ImgAry1, 640,556];
-
ImgAry[1]=['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg','7.jpg','8.jpg','9.jpg','10.jpg','11.jpg','12.jpg','13.jpg','14.jpg','15.jpg','16.jpg','17.jpg','18.jpg','19.jpg','20.jpg','21.jpg','22.jpg','23.jpg','24.jpg','25.jpg','26.jpg','27.jpg','28.jpg','29.jpg','30.jpg','32.jpg','33.jpg','34.jpg','35.jpg','36.jpg','37.jpg','38.jpg','39.jpg','40.jpg','41.jpg','42.jpg','43.jpg','44.jpg','45.jpg','46.jpg','47.jpg','48.jpg','49.jpg','50.jpg','51.jpg','52.jpg','53.jpg','54.jpg','55.jpg','56.jpg','57.jpg','58.jpg','59.jpg','60.jpg','61.jpg','62.jpg','63.jpg','64.jpg','65.jpg','66.jpg','67.jpg','68.jpg','69.jpg','70.jpg','71.jpg','72.jpg','73.jpg','74.jpg','75.jpg','76.jpg','77.jpg','78.jpg','79.jpg','80.jpg','81.jpg','82.jpg','83.jpg','84.jpg','85.jpg','86.jpg','87.jpg','88.jpg','89.jpg','90.jpg','91.jpg','92.jpg','93.jpg','94.jpg','95.jpg','96.jpg','97.jpg','98.jpg','99.jpg','100.jpg','101.jpg','102.jpg','103.jpg','104.jpg','105.jpg','106.jpg','107.jpg','108.jpg','109.jpg','110.jpg','111.jpg','112.jpg','113.jpg','114.jpg','115.jpg','116.jpg','117.jpg','118.jpg','119.jpg','120.jpg','121.jpg','122.jpg','123.jpg','124.jpg','125.jpg','126.jpg','127.jpg','128.jpg','129.jpg','130.jpg','131.jpg','132.jpg','133.jpg','134.jpg','135.jpg'];
-
How do I do this? I'd like it to randomly choose an image in the folder. The above code does NOT work!
Currently, I get the error
http://www.tpgames.net/gaming/2/word/cipher/f/undefined Current Page 1
Thanks!
NEW CODE: - var theTPImg = new Array();
-
ImgUrl[0]=['http://i107.photobucket.com/albums/m287/tpkyteroo/zgames/memory/tlstones1/'];
-
theTPImg[1]=['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg','7.jpg','8.jpg','9.jpg','10.jpg','11.jpg','12.jpg','13.jpg','14.jpg','15.jpg','16.jpg','17.jpg','18.jpg','19.jpg','20.jpg','21.jpg','22.jpg','23.jpg','24.jpg','25.jpg','26.jpg','27.jpg','28.jpg','29.jpg','30.jpg','32.jpg','33.jpg','34.jpg','35.jpg','36.jpg','37.jpg','38.jpg','39.jpg','40.jpg','41.jpg','42.jpg','43.jpg','44.jpg','45.jpg','46.jpg','47.jpg','48.jpg','49.jpg','50.jpg','51.jpg','52.jpg','53.jpg','54.jpg','55.jpg','56.jpg','57.jpg','58.jpg','59.jpg','60.jpg','61.jpg','62.jpg','63.jpg','64.jpg','65.jpg','66.jpg','67.jpg','68.jpg','69.jpg','70.jpg','71.jpg','72.jpg','73.jpg','74.jpg','75.jpg','76.jpg','77.jpg','78.jpg','79.jpg','80.jpg','81.jpg','82.jpg','83.jpg','84.jpg','85.jpg','86.jpg','87.jpg','88.jpg','89.jpg','90.jpg','91.jpg','92.jpg','93.jpg','94.jpg','95.jpg','96.jpg','97.jpg','98.jpg','99.jpg','100.jpg','101.jpg','102.jpg','103.jpg','104.jpg','105.jpg','106.jpg','107.jpg','108.jpg','109.jpg','110.jpg','111.jpg','112.jpg','113.jpg','114.jpg','115.jpg','116.jpg','117.jpg','118.jpg','119.jpg','120.jpg','121.jpg','122.jpg','123.jpg','124.jpg','125.jpg','126.jpg','127.jpg','128.jpg','129.jpg','130.jpg','131.jpg','132.jpg','133.jpg','134.jpg','135.jpg'];
-
-
var newBanner = 0;
-
var totalBan = theTPImg.length;
-
-
function cycleBan() {
-
newBanner++;
-
if (newBanner == totalBan) {
-
newBanner = 0;
-
}
-
document.banner.src= "'+ImgUrl+' 'theTPImg[newBanner]'";
-
// set the time below for length of image display
-
// i.e., "4*1000" is 4 seconds
-
setTimeout("cycleBan()", 4*1000);
-
}
-
window.onload=cycleBan;
-
-
Found here
The issue: It says the url is wrong. Actually, I probably have
this code wrong: - document.banner.src= "'+ImgUrl+' 'theTPImg[newBanner]'";
Its not recognizing the url variable. How should this code be written? Thanks!
This code would have the array I want.
CORRECTION:
The issue: Not changing the images at all. Only displays 1.jpg
This code is probably wrong, but don't know how to fix it. - document.banner.src= "'+ImgUrl+' 'theTPImg[newBanner]'";
Its not recognizing the url variable. How should this code be written? Thanks!
This code would have the array I want.
(try editing, got the edit box but then it timed out and gave me the can not edit page! Foolish program. Should not time out within 30 seconds of saying I'm within the time limit!)
ok.. lets forget about what you already have!
i tried to look at your code and im even more confused now :P
can you try to explain exactly what you want to do?
Clarification:
I'm trying to avoid having to add the URL of the image to every single image in the array and avoid making the image array
[html]
http://www.url.com/name1.jpg., http://www.url.com/name2.jpg, ect. for all 135 images.
[/html]
(Just in case it tried treating it as html anyhow, I added tags.)
This uses the original variable names with bannerImg.
The // indicates the original scripts array, with the images in the same folder as the script. My images are hosted at photob...dotCom , instead of at my site. I'm attempting to use an array to define the URL where the images are located, and a Array of the image names. I'm also attempting to have the code recognize the url of the images and attach it to the image names and display this image. Currently, the images will rotate like in a banner. - var bannerImg = new Array();
-
// Enter the names of the images below
-
// bannerImg[0]="image_jss.gif";
-
// bannerImg[1]="image_js.gif";
-
// bannerImg[2]="image_wr.gif";
-
-
-
ImgUrl[0]=['http://i107.photobucket.com/albums/m287/tpkyteroo/zgames/memory/tlstones1/'];
-
bannerImg[1]=['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg','7.jpg','8.jpg','9.jpg','10.jpg','11.jpg','12.jpg','13.jpg','14.jpg','15.jpg','16.jpg','17.jpg','18.jpg','19.jpg','20.jpg','21.jpg','22.jpg','23.jpg','24.jpg','25.jpg','26.jpg','27.jpg','28.jpg','29.jpg','30.jpg','32.jpg','33.jpg','34.jpg','35.jpg','36.jpg','37.jpg','38.jpg','39.jpg','40.jpg','41.jpg','42.jpg','43.jpg','44.jpg','45.jpg','46.jpg','47.jpg','48.jpg','49.jpg','50.jpg','51.jpg','52.jpg','53.jpg','54.jpg','55.jpg','56.jpg','57.jpg','58.jpg','59.jpg','60.jpg','61.jpg','62.jpg','63.jpg','64.jpg','65.jpg','66.jpg','67.jpg','68.jpg','69.jpg','70.jpg','71.jpg','72.jpg','73.jpg','74.jpg','75.jpg','76.jpg','77.jpg','78.jpg','79.jpg','80.jpg','81.jpg','82.jpg','83.jpg','84.jpg','85.jpg','86.jpg','87.jpg','88.jpg','89.jpg','90.jpg','91.jpg','92.jpg','93.jpg','94.jpg','95.jpg','96.jpg','97.jpg','98.jpg','99.jpg','100.jpg','101.jpg','102.jpg','103.jpg','104.jpg','105.jpg','106.jpg','107.jpg','108.jpg','109.jpg','110.jpg','111.jpg','112.jpg','113.jpg','114.jpg','115.jpg','116.jpg','117.jpg','118.jpg','119.jpg','120.jpg','121.jpg','122.jpg','123.jpg','124.jpg','125.jpg','126.jpg','127.jpg','128.jpg','129.jpg','130.jpg','131.jpg','132.jpg','133.jpg','134.jpg','135.jpg'];
-
-
//The rest of the original code is below.
-
-
var newBanner = 0;
-
var totalBan = bannerImg.length;
-
-
function cycleBan() {
-
newBanner++;
-
if (newBanner == totalBan) {
-
newBanner = 0;
-
}
-
document.banner.src=bannerImg[newBanner];
-
// set the time below for length of image display
-
// i.e., "4*1000" is 4 seconds
-
setTimeout("cycleBan()", 4*1000);
-
}
-
window.onload=cycleBan;
What I tried to do in my code was get ImgUrl and bannerImg to work together to display an image. My code was wrong, and don't know how it should be written. Here, I left my code out as it was all wrong.
Thanks!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Paul Cochrane |
last post by:
Hi all,
I've got an application that I'm writing that autogenerates python code
which I then execute with exec(). I know that this is not the best way to
run things, and I'm not 100% sure as to what I really should do. I've had a
look through Programming Python and the Python Cookbook, which have given me
ideas, but nothing has gelled yet, so I thought I'd put the question to the
community. But first, let me be a little more detailed...
|
by: A Traveler |
last post by:
Given i have some control which has an "ImageURL" property. If this property
is set, then the HTML code for the web control looks something like:
<mns:image id=MyImg runat=server ImageURL="images/somepath.jpg"></mns:image>
Given i have some server variable Session("AppRoot") which declares the full
path to the root of the application, for example
Session("AppRoot") = "http://www.someserver.com/myapp/"
Now is there any way i can put...
|
by: mark |
last post by:
I put this question on a new thread because, in spirit, it is a new question.
I apologize that I have difficulty formulating the proper question.
My application performs matrix computations on data stored in arrays A, B,
…G. Populate subs fill a datagrid on instances of form2 with the elements of
the arrays (one form2 instance per array) so that the user can see what is in
the arrays. The caption of the form2 instances displays what...
|
by: Xah Lee |
last post by:
The following is a program to generate thumbnail images for a website.
Useful, if you want to do that.
It is used to generate the thumbnails for my “Banners, Damsels, and
Mores” project gallery. (
http://xahlee.org/Periodic_dosage_dir/lanci/lanci.html )
Comments and versions in other lang welcome.
Xah
|
by: GabrielESandoval |
last post by:
i currently use the code below to create a slideshow of images. i
edited it so that its not as long. i currently have over 20 images
i want to change it so that the images dont appear in the same order
each time. what would i have to change to make the cycle random???
thanks in advance for the help.
gabriel
-- heres the code --
| |
by: laurakr |
last post by:
I am trying to use a clear to get my bottom nav bar below the quote box
on the right, but it isn't working. I would like the bottom edge of the
quote box to "stick" to the footer nav bar but copy to be able to flow
to the left of the quote box. For the bonus round I would like the
right edge of the box to align with the right edge of the footer Could
someone take a look at my code and help a newbie troubleshoot? my email
is lroeder at...
|
by: emily224 |
last post by:
Hello,
I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer must be embedded somewhere in the source code, and I would like to know if anyone knows where to find the correct answer.
I would greatly appreciate it!!
Thanks!!
<!--put the preloads file here as it must load before the website class...
|
by: emily224 |
last post by:
Hello,
I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer must be embedded somewhere in the source code, and I would like to know if anyone knows where to find the correct answer.
I would greatly appreciate it!!
Thanks!!
|
by: haft |
last post by:
I have posted this question on a javascript forum as it contains
javascript code however it was believed to be an asp issue.
The following head section javascript code contains the function
showBigImage( isource,bigImage,header ) function call of discussion:
var currentImage;
function showBigImage( isource,bigImage,header ) {
var theImage = document.getElementById( 'largeimage' );
theImage.src = isource;
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |