Click to See Complete Forum and Search --> : Html Or Script?


loosaloo1
03-19-2003, 11:12 PM
They are both similar but Im not sure where to post this problem. I have a script for a web cam but Im not sure where to change the html with in the script to make it work..
When I change
<b> <!-- Begin
var address ="" ;
var time = new Date();
var ab = time.getHours();
if ( ab >= 6 && ab < 22) {
address = "http://yourdomain.com/online.jpg";
}
else {
address = "http://yourdomain.com/offline.jpg";
}
document.write("<img src='" + address + "'>");
// End --><b>

yourdomain .com to what I think it should be Its not right. I cant seem to fine the path. I tried to follow html that I already from the present cam but I can't seem to make it work. There must be more to change but Im not sure where within do I need ot change.......
link to present cam
CAM (http://lenacam.tripod.com/)
This is the link fo rthe script I would like to use
SCRIPT (http://javascript.internet.com/page-details/web-cam-time.html)

Code One
03-20-2003, 02:49 AM
trying adding .htm instead .jpg

if that isnt what you mean please reinterate your question, and I will find a solution.


Code One

loosaloo1
03-20-2003, 10:12 AM
I will try that but the actually I don't think that is the problem.
In the code for the cam now the actual picture is webcam 32.jpg

Can you tell me in the new script that I would like to use what spots actually need changing? Is there more then just these....
address = "http://yourdomain.com/online.jpg";
}
else {
address = "http://yourdomain.com/offline.jpg";

In the source on my cam site ..http://www.lenacam.tripod.com/webcam32.jpg
shouldnt that be the correct path for the above?

Code One
03-20-2003, 01:52 PM
hey,
give me a second to or so to mess with your code and I will see If I can get to your link, cool?


Code One

loosaloo1
03-20-2003, 02:09 PM
Hey no problem . Take all the time you need... I appreciate the help. If you need anything else just let me know...

Code One
03-20-2003, 03:34 PM
Is the reason you want to use that paticular script, because you want to display the time? It looks like you already have your cam working?

Code One

loosaloo1
03-20-2003, 04:00 PM
No I have a count down. What I want is.... When you frist open the page there is nothing there till the camera counts down. Then when it refresh's it brings up the new picture. What I want is when you frist open the page you will see what ever the last picture was. Then when it refresh's it will refresh to the new picture. That way you have something to look at while you wait...
Can we add a line or 2 to the html we have now to make it work?
I do believe that is what the new script is. I built these pages from scratch. I got the camera script from somewhere. I don't remember having this much trouble finding the path before. I guess I just don't understand what they want for this particular script.

Code One
03-20-2003, 05:05 PM
Well in order to do that you must first have a frame set up on a seperate page or main page that will redirect you to your cam, the reason you dont see the cam right away is because you have to search for the cam to link to it, there isnt anyway to show the cam at start, considering it is remote. Let me try to set you up a frame that will have a pic and then redirect you to the cam, ok?


Code One

Code One
03-20-2003, 05:42 PM
the only thing I can think of to do is to shorting the length of the reload . . which may actually do more harm than good . .

code:
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META NAME="KEYWORDS" CONTENT<"appaloosa,appaloosa horse,Appaloosa,Appaloosa Stallion,appaloosa stallion,mare,Lena Cam,lena cam ,appaloosa foals,foal,appaloosa web cam,web cam,barn cam, horse, ApHC,western,riding,farm,equine,nez perce,mare,Lots of Work Ranch, ">
<META NAME="DESCRIPTION" CONTENT="Quality Appaloosa Horses bred for
beauty and performance. Featuring Appaloosas for sale, Appaloosa Foals, and a Live Barn Cam. .">
<title>Lena Cam</title>
<center><!--Begin JavaScript roadmap code. If editing downloaded HTML source, delete
this portion.-->

<script language="JavaScript">
<!--

function TripodShowPopup()
{
var bName=navigator.appName;
var bVer=parseInt(navigator.appVersion);
var now = new Date();
var popupURL = "/adm/popup/roadmap.shtml?"+"member_name=lenacam&path=index.html&client_ip=12.220.253.217&ts=1048203448&ad_type=POPUP&id=a0e18d74ad62ec9aa98684f57817317c";
var popupName = "TripodPopup";

if (bName=="Netscape" && bVer<=3)
{
var popupWin = window.open("", popupName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=482, height=215');
popupWin.focus();
}
else
{
var popupWin = window.open("", popupName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=472, height=200');
popupWin.focus();
}
popupWin.location = popupURL;
}

if(window.parent==window)
{
TripodShowPopup();
}

// -->
</script>

<script language="JavaScript1.2">
<!--

function changeOpenFunction()
{
var original_window_open = window.open;
function new_open_function(url, name, features, replace)
{
if(name != "TripodPopup")
return original_window_open(url, name, features, replace);
}
window.open = new_open_function;
}
var bName = navigator.appName;

if(bName != "Netscape")
changeOpenFunction();

// -->
</script>
<!--insite and popunder-->
<script language="javascript" type="text/javascript">
function showUnder(scale) {
var expdate = new Date ();
var surveyCookieName = "TRIPODPOPUNDER";
var percentOfferedSurvey = 100;
var surveyLocation = "/adm/popunder/tripod_popunder.html?"+"member_name=lenacam&path=index.html&client_ip=12.220.253.217&ts=1048203448&ad_type=POPUP&id=a0e18d74ad62ec9aa98684f57817317c";
var popupNewWindow = true;

expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000));
var stored_value = GetCookie(surveyCookieName);
if (stored_value == null){
SetCookie(surveyCookieName, "under", expdate, "/", ".tripod.com");
trUnder = window.open(surveyLocation,'under','height=300,width=720,toolbar=no,directories=no,status=no,menubar =no,scrollbars=no,resizable=no');
trUnder.blur();
}
}

function showInsite(){
var expdate = new Date ();
var surveyCookieName = "TRIPODINSITE";
var percentOfferedSurvey = 100;
var showSurvey = "(none)";
var surveyLocation = "/adm/redirect/cgi/adm/popunder/insite.html?"+"member_name=lenacam&path=index.html&client_ip=12.220.253.217&ts=1048203448&ad_type=POPUP&id=a0e18d74ad62ec9aa98684f57817317c"+"&member_url="+document.location;
var popupNewWindow = true;


expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000));
var stored_value = GetCookie(surveyCookieName);
if (stored_value == null && showSurvey != "(none)"){
SetCookie(surveyCookieName, "insite", expdate, "/", ".tripod.com");
trInsite = window.open(surveyLocation,'insite','height=300,width=450,toolbar=no,directories=no,status=no,menuba r=no,scrollbars=yes,resizable=no');
trInsite.blur();
}
}


function SetCookie (name,value,expires,path,domain,secure){
document.cookie = name + "=" + escape (value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
}

function getCookieVal (offset){
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name){
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
if( (document.cookie == null) || (document.cookie.length == null)){
return null;
}
var i = 0;
while (i < clen){
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}

showUnder();
showInsite();

</script><BODY background="debra.gif"text=9400D3 bgcolor=E6E6FA link=red vlink=red >
<!--- start Java code --->
<script language="Javascript">
<!-- hide
var x = 15; <--change 15 to 1 or 0--|
var y = 1;
var now;

function caminawin()
{ window.open('webcam32.jpg', 'popwin', 'scrollbars=0,status=0,toolbar=0,resizable=0,width=346,height=265,top=150,left=185'); }
function startClock() {
x = x-y;
document.form1.clock.value = x;
if (x <= 1) reload();
timerID = setTimeout("startClock()", 1000);
}

function reload() {
now = new Date();
var camImg = "webcam32.jpg" + "?" + now.getTime();
document.campicture.src = camImg;
x = 15;
document.form1.clock.value = x;
}
// end hide -->
</script>
</head>
<body bgcolor="white" onLoad="startClock()">
<center>
<font face="Arial,Helvetica,Verdana" size=-1>
<h1></h1>
<h1>LENA CAM</h1><p>
<h3> HONEY</h3<p>

<img name="campicture" src="http://www.lenacam.tripod.com/webcam32.jpg" border=1 width=320 height=240 alt="Lena Cam"><br>
<form NAME="form1"><b><font size="-1" face="Arial">AutoReload in ~ </font>
<input TYPE="text" NAME="clock" SIZE="2" VALUE> <font size="-1" face="Arial">seconds.</font></B><br><a>
<P><A href=http://lotsofworkranch.tripod.com/index.html>CAMERA # 2</A>
<h2>Please DO NOT hit RELOAD on your browser.<h2/a>
<p>
<h2>Welcome to Lena Cam.<h2><h2> You are watching one of the five horses I have on the property. We are located in Norco, California. A small horse town located in Southern California.<h3>In the near future more camera's will be added.</h3><BR>
Thank you for stopping by.</h2><a

<a href="http://www.lotsofworkranch.homestead.com/index.html">LOTS
OF WORK RANCH</a></p><center><br>
<img src="soyemail.gif" Align=center
alt="Send Mail to Lots of Work Ranch"
Related Links<br>
<ul>
<li> <a href=mailto:lotsofworkranch@yahoo.com> E-mail</a>
</ul>
<a href="http://www.wunderground.com/US/CA/Norco.html">
<img src="http://banners.wunderground.com/banner/gizmotimetemp/US/CA/Norco.gif"
alt="Click for Norco, California Forecast" height=41 width=127><left></a>
<noembed>
</noembed>
<!-- BEGIN FASTCOUNTER CODE -->
<p><a href="http://member.bcentral.com/cgi-bin/fc/fastcounter-login?2433908" target="_top">
<img border="0" src="http://fastcounter.bcentral.com/fastcounter?2433908+4867823"><p></a>
<!-- END FASTCOUNTER CODE -->
<br>
<!-- BEGIN FASTCOUNTER LINK -->
<font face="arial" size="1">
<a href="http://fastcounter.bcentral.com/fc-join" target="_top">FastCounter by bCentral</a></font><br>
<!-- END FASTCOUNTER LINK -->
<p><br><br><br>
<hr width=225>
<font size=-2>Base Template courtesy of
<b><i><a href="http://webcamworld.com/" target="_top">WebCam World</a></i></B>.
</font><p><br>
</font>
</center>
</BODY>
</html>


Like I said that might be a bad thing, so you can also try voewing the source code of other web cam sites that have what your looking for, just copy and paste to your editor and mess around with it till you find out what makes the web cam work the way you want. Sorry I couldnt execute a working code. Maybe I can help better next time.


Code One

loosaloo1
03-20-2003, 09:55 PM
Hey, its cool it was worth a try. I will just keep diddling with it and who knows I just might work it out. I went serching last night for a differnet code last night. But every thing is so boring. I have only found 1 other one I like . It gives you the watcher options to deside if you want 2,10,20,30 second reloads. But I havent been able to get that working either. I don'tr think the full code showed thru.

Im sure somewhere down the long rode I can work it out...
:D

Code One
03-20-2003, 10:20 PM
I showed you how to determine the reload function in the script I gave you above just search threw it look for something that looks like: <-- text--|
I wrote the directions in that arrow thing.

Code One

loosaloo1
03-20-2003, 10:50 PM
I will go thru it and play with it and see what it does...