The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Webcam with button - best way to go?
icepick
post Oct 14 2011, 11:47 PM
Post #1





Group: Members
Posts: 2
Joined: 14-October 11
Member No.: 15,627



Hi everyone,

I have a simple HTML page showing a live webcam feed. Underneath the webcam image I have a couple of links the user can push (stuff like "turn the light on" and "turn the light off" ). When the user clicks the link I want him to stay on the same page, and in the background it should call a small light-on.php script. I don't want him to leave the webpage.. all he should keep on seeing is the webcam feed.

What I do right now is I use frames.. so when he clicks the link it opens up a black page in a very small 1% frame (so the user doesn't notice it does that).. but is there a nicer way to do this?

Regards,
Alex
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 14 2011, 11:57 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



What's the purpose of it if the user doesn't see it? Sorry, but I'm sort of thick.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 15 2011, 01:26 PM
Post #3


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Oct 15 2011, 06:57 AM) *

What's the purpose if it if the user doesn't see it? Sorry, but I'm sort of thick.

I think the PHP script is loaded in the invisible frame. That way you can submit a form or querystring without reloading the main page.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 15 2011, 01:27 PM
Post #4


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



QUOTE(icepick @ Oct 15 2011, 06:47 AM) *

is there a nicer way to do this?

The only other way I know is with Ajax, but IMO the frame solution is the nicest alternative.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 15 2011, 01:35 PM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Oh. "Black page" (blank page?) made me think the background color of the invisible iframe changed depending on if the user want to turn the light on or off. blush.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
icepick
post Oct 16 2011, 02:31 AM
Post #6





Group: Members
Posts: 2
Joined: 14-October 11
Member No.: 15,627



Thanks guys.. guess I will stick with the frame then..

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 11:10 AM