473,320 Members | 1,683 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,320 software developers and data experts.

Time dependent image display

Hi,

i'm getting no success, with my attempt
displaying some pictures one after another
for i.e. some seconds.

null.jpg is a white site!

Really thanks for any help,
regards,Christian
<html>
<SCRIPT type="text/javascript">
function image_on()
{ setTimeout("image_off()",4000)}

function image_off()
{document.images[0].src=(c:/omninet/null.jpg)}

</SCRIPT>
<body>

<IMG onLoad="image_on()" src=/picture1.jpg >

<IMG onLoad="image_on()" src=/picture2.jpg>

<IMG onLoad="image_on()" src=/picture3.jpg>

</body>
</html>
Jul 20 '05 #1
5 4952

"christian" <oz***@web.de> wrote in message
news:1a**************************@posting.google.c om...
Hi,

i'm getting no success, with my attempt
displaying some pictures one after another
for i.e. some seconds.
Generally the way it is done is for you to place the pic names in an
array, and sequentially load them via a timer() using an incrementing
counter as an array index. Here is an IE slideshow I wrote:

http://zintel.com/picsel.html

Another version: http://zintel.com/snaps.html
null.jpg is a white site!

Really thanks for any help,
regards,Christian
<html>
<SCRIPT type="text/javascript">
function image_on()
{ setTimeout("image_off()",4000)}

function image_off()
{document.images[0].src=(c:/omninet/null.jpg)}

</SCRIPT>
<body>

<IMG onLoad="image_on()" src=/picture1.jpg >
I don't see an onLoad method n the IMG spec.

It is good practice to wrap your attribute values in quotes, here the
"/picture1.jpg"
<IMG onLoad="image_on()" src=/picture2.jpg>

<IMG onLoad="image_on()" src=/picture3.jpg>

</body>
</html>


zin

Jul 20 '05 #2

"George Ziniewicz" <zi**@cox.net> wrote in message
news:1c6_a.55870$Ne.16097@fed1read03...

"christian" <oz***@web.de> wrote in message
news:1a**************************@posting.google.c om...
Hi,

i'm getting no success, with my attempt
displaying some pictures one after another
for i.e. some seconds.
Generally the way it is done is for you to place the pic names in an
array, and sequentially load them via a timer() using an incrementing
counter as an array index. Here is an IE slideshow I wrote:

http://zintel.com/picsel.html

Another version: http://zintel.com/snaps.html
null.jpg is a white site!

Really thanks for any help,
regards,Christian
<html>
<SCRIPT type="text/javascript">
function image_on()
{ setTimeout("image_off()",4000)}

function image_off()
{document.images[0].src=(c:/omninet/null.jpg)}

</SCRIPT>
<body>

<IMG onLoad="image_on()" src=/picture1.jpg >


I don't see an onLoad method n the IMG spec.


My mistake, there is one!
It is good practice to wrap your attribute values in quotes, here the
"/picture1.jpg"
<IMG onLoad="image_on()" src=/picture2.jpg>

<IMG onLoad="image_on()" src=/picture3.jpg>

</body>
</html>


zin

Jul 20 '05 #3
On Tue, 12 Aug 2003 08:12:07 -0700, "George Ziniewicz" <zi**@cox.net>
wrote:

"George Ziniewicz" <zi**@cox.net> wrote in message
news:1c6_a.55870$Ne.16097@fed1read03...

"christian" <oz***@web.de> wrote in message
news:1a**************************@posting.google.c om...
> Hi,
>
> i'm getting no success, with my attempt
> displaying some pictures one after another
> for i.e. some seconds.


Generally the way it is done is for you to place the pic names in an
array, and sequentially load them via a timer() using an incrementing
counter as an array index. Here is an IE slideshow I wrote:

http://zintel.com/picsel.html

Another version: http://zintel.com/snaps.html

So, for those of me who are not java literate but trying to grasp it,
can you post a stand alone working script ???

Thanks,

Andy

"There would be a lot more civility in this world if people
didn't take that as an invitation to walk all over you"
- (Calvin and Hobbes)
Jul 20 '05 #4
"andy johnson" <an************@chicagonet.net> wrote in message news:o2********************************@4ax.com...
On Tue, 12 Aug 2003 08:12:07 -0700, "George Ziniewicz" <zi**@cox.net>
wrote:

"George Ziniewicz" <zi**@cox.net> wrote in message
news:1c6_a.55870$Ne.16097@fed1read03...

"christian" <oz***@web.de> wrote in message
news:1a**************************@posting.google.c om...
> Hi,
>
> i'm getting no success, with my attempt
> displaying some pictures one after another
> for i.e. some seconds.


Generally the way it is done is for you to place the pic names in an
array, and sequentially load them via a timer() using an incrementing
counter as an array index. Here is an IE slideshow I wrote:

http://zintel.com/picsel.html

Another version: http://zintel.com/snaps.html

So, for those of me who are not java literate but trying to grasp it,
can you post a stand alone working script ???

Here is a fairly minimal slideshow (the minimum I would do), featuring a table centered pic, selectable delay, click to hold/continue, and onscreen info. All that needs changing is to set "base" to the basepath of your images like 'myFolder/birthday/') and put the pic names in the pic array list like 'file1.jpg','file1.gif' ...:
btw, here is a new "fullscreen" slideshow I posted today, I tried for cross-browser but w/ IE features, with zoom, filters, draggable and hideable menu, scrolling div info, etc:

http://zintel.com/cb_start.html

zin

---------------------------------------------------

<html><head><title>Minimal Slide Show</title>

<!-- --- style for a dark background, optional --- -->

<style type='text/css'>
body{
color:#FFFFFF;
background-color:#111111;
}
input{
text-align:center;
}
</style>

<!-- ------- script for slideshow functions ------- -->

<script type='text/javascript'>
<!-- hide script content from old browsers

var base='snaps/'; // base dir of images

var pics=new Array( // list of file names in dir to show
"k6077.jpg","k6080.jpg","k6086.jpg","k6088.jpg","k 6094.jpg"
);

var on=1; // run flag
var picnum=-1; // current pic #
var timerID=0;
var interval=3000; // 3 second delay

//----------------------------------------------------------
//----------------------------------------------------------
//----------------------------------------------------------

function advance() { // move to the next pic:
picnum+=1; // increment
picnum%=pics.length; // wraparound if necessary
}

//----------------------------------------------------------

function show() { // show current pic:
document.pic.src=base+pics[picnum]; // load it
document.pic.alt=pics[picnum]; // update alt
update();
}

//----------------------------------------------------------

function timer() {
if (on) { // if running
advance(); // next one
show(); // show it
}
timerID=setTimeout('timer()',interval); // next time
}

//----------------------------------------------------------

function toggle() {
switch (on) {
case 0: // if off
on=1;
advance();
show();
update();
timer();
break;
case 1: // if on
on=0;
update();
clearTimeout(timerID);
break;
}
}

//----------------------------------------------------------

function update() { // update onscreen info
var str;
if (on) {
str='PLAY: ';
document.myForm.myText.style.backgroundColor='whit e';
} else {
str='HOLD: ';
document.myForm.myText.style.backgroundColor='yell ow';
}
document.myForm.myText.value=str+pics[picnum]; // name
}

//----------------------------------------------------------

// ...end hiding content from old browsers -->
</script>
</head>

<!-- ----------------------------------------------------- -->
<!-- ----------------------------------------------------- -->
<!-- ----------------------------------------------------- -->

<body onLoad='timer();'>
<center>

<!-- --------------- form for widgets --------------- -->

<form name='myForm' onSubmit='return false'>
<input type='text' name='myText' width='20'>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

Delay:
<select onChange='clearTimeout(timerID);
interval=(selectedIndex+1)*1000; timer();'>
<option>1 <option>2 <option selected='selected'>3
<option>4 <option>5 <option>6 <option>7 <option>8
</select>
Sec.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

Click Pic to Hold or Continue
<br />
</form>

<!-- --------- table to hold a centered pic --------- -->

<table align='center' valign='middle' height='100%' border='0'>
<tr><td align='center' valign='middle'>
<img src='' name='pic' id='pic' onClick='toggle();'>
</td></tr>
</table>

</center>
</body>
</html>
Jul 20 '05 #5
oz***@web.de (christian) wrote in message news:<1a**************************@posting.google. com>...

i'm getting no success, with my attempt
displaying some pictures one after another
for i.e. some seconds.


You can check out my site for an example:

http://slideshow.barelyfitz.com/
Jul 20 '05 #6

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

Similar topics

12
by: | last post by:
I've trolled the lists, FAQs, and Net as a whole, but can't find anything definitive to answer this. We're looking for real-time graph capability (bar, line, etc), so that we can display...
1
by: Jim Moe | last post by:
Hello, I am (slowly) in the process of changing a table-based layout to CSS/div-based. One area that uses tables a lot is the main nav menu. I have discovered that tables have advantage: all...
4
by: Adrian MacNair | last post by:
Hi, I created an image gallery which displays 63 images in a slideshow. The problem is that the show was slow because each image loaded one at a time during the show. No problem right? I just...
10
by: lorirobn | last post by:
Hi, I have a form with several combo boxes, continuous form format, with record source a query off an Item Table. The fields are Category, Subcategory, and Color. I am displaying descriptions,...
4
by: Gary Jackson | last post by:
I present a radio show on a voluntary radio station every Sunday between 3 and 5pm Is there a script which will change one graphic between those times? Be nice if my web page could change to...
23
by: mosesdinakaran | last post by:
Hi All, I need a small clarification in submitting the forms, Ur suggestions please. In a page I have two form and also two submit butons. (ie)
7
by: Dave | last post by:
Hello All, These one may be a bit tricky, and what I'd like to do may not even be possible. I would love to hear any ideas you guys have for solving this. Here is the situation: I have a form...
1
adelemb
by: adelemb | last post by:
Hi all, I want an image to display in a table if another table cell shows an updated date of less than 24hours. The date displayed in the cell is already working and display fine, but I have no...
4
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
1
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.