Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I know this has been asked before...

Status
Not open for further replies.

PEMG

Programmer
Jan 3, 2001
2
NL
Hi everyone!

I'm working on a page which loads when the visitor clicks on the "Load Webcam" button for my webcam and at this point there's one thing that's holding me back from uploading the page and it's the (maximize button) I've tried to use the :
window.showModalDialog() command but this won't do me any good cause then the visitor can't refresh the image in this dialog. I upload screenshots from the webcam every 5 seconds so when the visitor click's on the "Refresh" button he/she gets to see the updated image!

How do I disable the mamximize button of the dialog (IE) and can I refresh the image only without having to refresh the whole window? The most important thing right now for me is to know how to disable the maximize button.

Best regards,

Patrick EM Grijsen
The Hague, The Netherlands
 
You can use mywin = window.open("campage.htm","camwin","height=200,width=200")

this should have just a barebones window, no scrollbar, just a close window button and a minimize button. I'm not sure about that refreshing image thing though. jared@aauser.com
 
Does the webcam overwrite the old image on your filesystem, or does it number it in a logical way?

If so, you could do something like this:

function refresh_image()
{
document.pic.src = "camshot.gif";
setTimeout('refresh_image()',5000);
}

<body onload=&quot;refresh_image()&quot;>
<img src=&quot;camshot.gif&quot; name=&quot;pic&quot; alt=&quot;&quot;>

If you had to account for an incrementing number, you could do something along these lines in the function:

count++;
eval(&quot;document.pic.src = 'camshot&quot;+count+&quot;.gif'&quot;);

Where count is first declared and set to zero or one outside the function.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Right I found out how to make a modal window (dialog)
but can't get it to unload with a button. Next to this problem I would like to use the refresh script that Tom Anderson explained but this doesn't seem to work with modal windows. How can I make this baby run? &quot;I know the script from Tom Anderson must be in the webcam page and not on the page which loads the webcam window!&quot;

<!--

// FreeCam
features('
function features() {
var features=&quot;dialogwidth:320px; dialogheight:240px; help:0; status:0;&quot;;
window.showModalDialog(&quot; !features;
}

var features;

// -->

This script might not be structured well but that's just because I'm not a expert!

Best regards,

Patrick EM Grijsen
The Hague, The Netherlands
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top