473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

For Each Question

I never used JavaScript before and am not sure how to do something. I
am a programmer and use VBScript, so I am familiar with programming
terminology - just not javascript.

I found some cool free code on the internet for a slide show on a
website and want to modify it. In the script it appears to require you
to enter each picture directly. What I would like to do is use a for
each...next loop and create a slideshow for each picture in the folder.
Would someone here mind explaining the correct way to do this? The
code to add an individual picture is below. I just need to know how to
modify it.

Thanks!
Jennifer

s = new slide();
s.src =
"http://www.freewebs.com/hannahshope/images/HannahCoulterLR.jpg";
s.text = unescape("");
s.link = "";
s.target = "";
s.attr = "";
s.filter = "";
SLIDES.add_slide(s);

Oct 2 '06 #1
2 1212


J.**********@gmail.com wrote:
I never used JavaScript before and am not sure how to do something. I
am a programmer and use VBScript, so I am familiar with programming
terminology - just not javascript.
Then you need to start learning it
<http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide>
<http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference>
if you want to use it yourself.
I found some cool free code on the internet for a slide show on a
website and want to modify it. In the script it appears to require you
to enter each picture directly. What I would like to do is use a for
each...next loop and create a slideshow for each picture in the folder.
What folder? Is that a script used on the server with classic ASP?
Client-side script in the browser (whether it is JavaScript or VBScript
does not matter) usually does not have access to the file system to find
folders or files in folders.


--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 2 '06 #2
On Mon, 02 Oct 2006 08:15:05 -0700, J.Evans.1970 wrote:
I never used JavaScript before and am not sure how to do something. I
am a programmer and use VBScript, so I am familiar with programming
terminology - just not javascript.

I found some cool free code on the internet for a slide show on a
website and want to modify it. In the script it appears to require you
to enter each picture directly. What I would like to do is use a for
each...next loop and create a slideshow for each picture in the folder.
Would someone here mind explaining the correct way to do this? The
code to add an individual picture is below. I just need to know how to
modify it.

Thanks!
Jennifer

s = new slide();
s.src =
"http://www.freewebs.com/hannahshope/images/HannahCoulterLR.jpg";
s.text = unescape("");
s.link = "";
s.target = "";
s.attr = "";
s.filter = "";
SLIDES.add_slide(s);
This is untested but should get you started even if it's not perfect.

var slide_src = new Array(
'http://www.freewebs.com/hannahshope/images/HannahCoulterLR.jpg',
'http://some.other.domain/pic.jpg',
etc
);
for(i=0;i<slide_src.length;i++) {
s = new slide();
s.src = slide_src[i];
s.text = unescape("");
s.link = "";
s.target = "";
s.attr = "";
s.filter = "";
SLIDES.add_slide(s);
}

Rich

--
I guess everybody's the same: Gotta be good at your job before you can enjoy the rest of your life
-- Cole Trickle

Oct 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
53
by: Jeff | last post by:
In the function below, can size ever be 0 (zero)? char *clc_strdup(const char * CLC_RESTRICT s) { size_t size; char *p; clc_assert_not_null(clc_strdup, s); size = strlen(s) + 1;
56
by: spibou | last post by:
In the statement "a *= expression" is expression assumed to be parenthesized ? For example if I write "a *= b+c" is this the same as "a = a * (b+c)" or "a = a * b+c" ?
2
by: Allan Ebdrup | last post by:
Hi, I'm trying to render a Matrix question in my ASP.Net 2.0 page, A matrix question is a question where you have several options that can all be rated according to several possible ratings (from...
3
by: Zhang Weiwu | last post by:
Hello! I wrote this: ..required-question p:after { content: "*"; } Corresponding HTML: <div class="required-question"><p>Question Text</p><input /></div> <div...
1
by: love91501 | last post by:
I was wondering if anyone would be able to help me figure out how to make my Q010 have the ability to chose 2 answers, I'm hoping to stay away from checkboxes but I am willing to take in any advice....
6
semanticnotion
by: semanticnotion | last post by:
Hi sir i want to transform the data of one table into another through foreign key but the following error come to my browser Here is my code and data base structure. CREATE TABLE IF NOT...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.