Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
how to send http url without new window
Old 04-01-2009, 06:03 AM how to send http url without new window
Novice Talker

Posts: 5
Name: kaeton
Trades: 0
I am trying to send this http command to a network camera from a web page (inside the network, not an actual website.)

http://192.168.1.18/axis-cgi/com/ptz...ouszoommove=30

when I put this command in a browser address bar the camera receives it.

When I put it on a hyperlink on a page the hyperlink opens another page and sends the command to the camera.

Is there anyway that I can send this command to the camera without opening another browser page.

I am using Dreamweaver cs4 to program the html code.

I think I need to send a "POST" command using java, but I don't know java.

I was hoping that there was a way to do this with html, or if someone can explain how to do it in Java.
kaeton is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-01-2009, 07:04 AM Re: how to send http url without new window
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Quote:
I think I need to send a "POST" command using java, but I don't know java.
More javascript than java (which are 2 completely different beasts).

If you want to stick with html, and don't need to get a return code from the camera, then simply use an hidden iframe, and make the target of the link that iframe.
The page will stay the same for the user that way.
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head><title>command</title></head>
  <body>
  <iframe src="#" style="display:none" name="if"></iframe>
  <a href="http://192.168.1.18/axis-cgi/com/ptz.cgi?continuouszoommove=30" target="if">start camera zoom move</a>
  </body>
</html>
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 04-01-2009, 08:28 AM Re: how to send http url without new window
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Oh, I forgot to clear up 1 more thing.
A POST request is made via a form, inside a web page.
You said that you could enter the url in a browser, and see that it had the effect you where attending.

When you type a url in the browser address box, it's always a GET request that is done.
Thus, no, you don't need to craft a POST request from javascript, or vi a form, you can simply make a GET request via the iframe.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to how to send http url without new window
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26194 seconds with 12 queries