Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Execute HTML in the background?

HTML

  • Please log in to reply
8 replies to this topic

#1 wavejam

wavejam

    CC Lurker

  • Just Joined
  • Pip
  • 4 posts

Posted 16 March 2009 - 10:28 AM

Hi all...

I'm trying to put together a simple html that will control a webcam. I need it to have buttons (or links) that control the camera position. The cam position can be changed with a URL such as:

xxx.xxx.xxx.xxx/pt/ptctrl.cgi?preset=move,1
xxx.xxx.xxx.xxx/pt/ptctrl.cgi?preset=move,2
xxx.xxx.xxx.xxx/pt/ptctrl.cgi?preset=move,3
xxx.xxx.xxx.xxx/pt/ptctrl.cgi?preset=move,4

I want to somehow execute the above URLs without leaving the current webpage. So, I guess you can say I want to execute the above URLs in the background with no popups, no feedback, no nothing. And, I need it to work in IE, Firefox, Safari.

Any help would be appreciated.
  • 0

#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 16 March 2009 - 10:51 AM

You will need to have each button call a JavaScript function that uses AJAX to pass the feedback to the server. You will need some form of server-side processing to act on the button press.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 16 March 2009 - 11:58 AM

Hmm.. is a server-side processing really necessary?
shouldn't the ajax be able to directly ask that script for update?
  • 0

#4 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 16 March 2009 - 03:59 PM

A script IS server-side processing.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#5 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 16 March 2009 - 04:25 PM

an javascript calling the urls by XMLhttpRequest would be client-side only.
  • 0

#6 xsonline

xsonline

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 51 posts
  • Programming Language:PHP, JavaScript, PL/SQL

Posted 03 April 2009 - 05:52 AM

maybe a stupid idea, but if you really don't want to use ajax, and just html, you could also use an iframe to make it work. <iframe id="iframe" style="visibility:hidden;position:absolute;"></iframe>

lol, the stupidest possible way, I know, but maybe it's the easiest.
  • 0

#7 hkp

hkp

    CC Regular

  • Just Joined
  • PipPipPip
  • 36 posts

Posted 28 May 2009 - 09:38 PM

According to me you need to use javascript and mainly server side scripting.

________________
Design a website
  • 0

#8 Mers

Mers

    CC Newcomer

  • Just Joined
  • PipPip
  • 11 posts

Posted 22 June 2009 - 03:31 AM

It's not really what you asked for, but it works...
There you go:
<SCRIPT LANGUAGE="JavaScript"> 
<!--
function ChangeLeft(shades) {
if (navigator.appName=='Netscape') 
document.layers["myID"].left=((document.layers["myID"].left)+shades);
else 
document.all.myID.style.left=((document.all.myID.style.pixelLeft)+shades); }
function ChangeTop(shades) {
if (navigator.appName=='Netscape') 
document.layers["myID"].top=(document.layers["myID"].top)+shades;
else 
document.all.myID.style.top=(document.all.myID.style.pixelTop)+shades; }
// -->
</script><DIV ID="myID" STYLE="position:absolute;width:auto;height:auto;left:1px;top:150px;">
<center>
<BR>
Some Plain text and an image, too
<BR>
<img src="../java/rain.gif" border=0>
</center>
</DIV>
<form name=colorsBack>
<input type=button value="Move -1 left" onclick="ChangeLeft(-1);">
<input type=button value="Move 1 left" onclick="ChangeLeft(1);">
<input type=button value="Move 50 left" onclick="ChangeLeft(50);">
<input type=button value="Move -50 left" onclick="ChangeLeft(-50);">
<BR>
<input type=button value="Move -1 top" onclick="ChangeTop(-1);">
<input type=button value="Move 1 top" onclick="ChangeTop(1);">
<input type=button value="Move 50 top" onclick="ChangeTop(50);">
<input type=button value="Move -50 top" onclick="ChangeTop(-50);">
</form>

  • 0

#9 Guest_Kristian Finlay_*

Guest_Kristian Finlay_*
  • Guest

Posted 19 August 2009 - 10:35 PM

Most of the time you login into remote server via ssh. If you start a shell script or command and you exit , the process command will get killed. Sometime job or command takes a long time.
  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download