...

View Full Version : help with image script variables



bst82551
01-10-2005, 11:59 PM
I've written a webcam script for my website. I'm trying to improve it so that you can select the the amount of time until the next refresh. The "time" part seems to be giving me trouble in the code below:

function pause(time) {
document.images['cam'].onload = 'pause(time)';
setTimeout('refresh()',time);
}

On 2nd line(starts document.images['cam']...), what can i use instead of "time" to make the script use the time variable from the first line(function pause(time) {)?

<img src="http://bst82551.ath.cx:8080/cam_1.jpg" name="cam" onLoad="pause(3000)" onError="stop()">

^^ this is the part in the body that displays the refreshed images.

Brian

glenngv
01-11-2005, 05:35 AM
You don't have to post your question in multiple threads.

http://www.codingforums.com/showthread.php?p=263489#post263489



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum