There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen boot bsod computer connection crash css dell drive driver drivers email error ethernet excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware monitor network networking outlook outlook 2003 outlook express printer problem problems ram router slow sound sprtcmd.exe startup trojan usb virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Need Help With A JavaScript Script - Newbie


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
HexStar's Avatar
HexStar
Guest with n/a posts.
 
17-Jun-2003, 05:07 PM #1
Exclamation Need Help With A JavaScript Script - Newbie
I want to change the following javascript:
Click here to see the source for the JavaScript

Hexstar
Removed Javascript due to kicking errors.
Dave

Last edited by HexStar : 30-Jun-2003 07:20 PM.
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
17-Jun-2003, 05:20 PM #2
JavaScript does not know what images are in the directory. However, if they are named with numbers and you know the number of images, you might be able to make something that would create the list of images for you.
So if you can rename the images to something like
01.jpg
02.jpg
03.jpg
etc, maybe I can come up with something
__________________
-Brendan
HexStar's Avatar
HexStar
Guest with n/a posts.
 
17-Jun-2003, 05:24 PM #3
OK, so I'll do that. Could you change the script so it would display all images with a number in a folder automatically and in order?

Thanks,

HexStar
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
17-Jun-2003, 05:27 PM #4
There are other scripts for slideshows...thats a random image generator. But yea, tell me how many images there are, and what the naming convention is (eg. 01,02,03) and I will write a slideshow script for ya.
HexStar's Avatar
HexStar
Guest with n/a posts.
 
17-Jun-2003, 11:34 PM #5
Could you make a variable that defines how many files there are? That way if I add more files I could change it to work. See, I want to have a script that rotates images like those ad banners. Is that possible for you to do?

Thanks in advance,

HexStar
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
17-Jun-2003, 11:35 PM #6
Yup thats what I'm going to do. I am working on it right now.
It will go up to 99 files, that sound ok?
HexStar's Avatar
HexStar
Guest with n/a posts.
 
17-Jun-2003, 11:42 PM #7
Yeah. Could you post the edited JavaScript here too?

Thanks,

HexStar
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
17-Jun-2003, 11:45 PM #8
Yup still working on it.
HexStar's Avatar
HexStar
Guest with n/a posts.
 
17-Jun-2003, 11:52 PM #9
OK.

Thanks,

HexStar
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
18-Jun-2003, 12:20 AM #10
Hex, im not sure why but my code isnt working. Just nothing happening at all. But theres no errors, so that means it probably just a typo in the reference to the image or function or something simple
Its after midnight, so maybe after i get some sleep (later) I will have another look.
PHP Code:
<img src="1.jpg">
<
script language="javascript">
function 
slideshow()
{
var 
fileroot "file:///C:/WINDOWS/Desktop/";
var 
images 99;
var 
filetype ".jpg";
var 
curImage document.images[0].src;
var 
curImage curImage.replace(filetype'');
var 
curImage curImage.replace(fileroot'');
var 
newImageNum parseInt(curImage) + 1;
var 
newImage fileroot newImageNum filetype;
document.images[0].src newImage;
if (
newImageNum <= images)
{
setTimeout("slideshow()"300)}
}
</script> 
__________________
-Brendan
HexStar's Avatar
HexStar
Guest with n/a posts.
 
20-Jun-2003, 03:14 PM #11
K, thanks I'd appreciate it if you fix the error. Also could you make it so that you could set the root to be a folder in a webserver root /(foldername).

Thanks alot,

HexStar
HexStar's Avatar
HexStar
Guest with n/a posts.
 
24-Jun-2003, 11:08 PM #12
I think I found the problem. In the
PHP Code:
<script lanuage "JavaScript> tag after doing the fucntion you forgot to put in slideshow(); and then </script>. 
Thanks for the script,

HexStar

Last edited by Davey7549 : 25-Jun-2003 08:42 AM.
HexStar's Avatar
HexStar
Guest with n/a posts.
 
24-Jun-2003, 11:11 PM #13
OK, that's messed up. Let me try saying this again...
PHP Code:
I think I found the problemIn the <script lanuage "JavaScript> tag after doing the fucntion you forgot to put in slideshow(); and then </script>. 
HexStar
HexStar's Avatar
HexStar
Guest with n/a posts.
 
24-Jun-2003, 11:16 PM #14
Thumbs up Thanks!
PHP Code:
I think I found the problemIn the <script language "JavaScript> tag after doing the function you forgot to put in slide show(); and then </script>. 
HexStar
bassetman's Avatar
Computer Specs
Moderator with 47,094 posts.
 
Join Date: Jun 2001
Location: Great White North (WI)
Experience: Getting somewhere I hope
25-Jun-2003, 02:16 AM #15
in the?

I use that script on another members page here. Works fine for me. Either rename the pics or the script names.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:05 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.