Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 11-20-2005, 03:06 PM function problem
Novice Talker

Posts: 9
Trades: 0
Hello, does anyone know why when i call the following function only the third setTimeout works. The function is called using onload:-

<body topmargin="0" leftmargin="9" onload = "javascriptictureloop()">

the function:-

function pictureloop(){
setTimeout("loadPicture('pics/hansel/witch.jpg')",1000);
setTimeout("loadPicture('pics/hansel/witch2.jpg')",1000);
setTimeout("loadPicture('pics/hansel/witch3.jpg')",1000);
}

loadpicture() loads the requested picture into a seperate frame.

Also, if anyone knows how i could incorporate a fade in/fade out effect for each picture that would be cool but not desperately needed.

Cheers

Paul


phouse is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-21-2005, 12:20 AM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
It should just be onload="pictureloop();" you don't need the "javascript:", that's only for JS call in hrefs. Also all the timeouts are being called virtually at once, try 1000 for the first, then 2000 for the second then 3000 milliseconds for the third.
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Reply     « Reply to function problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12441 seconds with 12 queries