I have been working on a page for my site. I am making my own online webcam page...from scratch, i am building every part of it. The camera is moveable and i have a php page to send commands to the pc with the camera on it. the page has a recent picture from the camera and controlls for the camera under it(for now). i have a picture refresh button under the image that will refresh it when clicked..duh. I want to send the command ( preferably a move left button, and move right button. right now i have a combo box with a submit button) without refreshing the whole page, it can refresh the image but doesnt have to. After looking around on the internet i realized that i should do that with ajax. Am i right about that? and whats the best way to set it up for what i need.
.dok
Ajax?
Moderator: General Moderators
Help
Here is the php page that i have. the one that the move direction is submitted to.
I want to submit the movement to this page but not have the submitting page refresh or reload.
thanks for your help.
.dok
Code: Select all
<?
//connect to ****ip*****, tcp/ip
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_connect($sock,"****ip*****", 23);
socket_set_nonblock($sock);
socket_set_block($sock);
socket_send($sock,$_POST['command'],strlen($_POST['command']),0);
header("Location: http://*****RedirectUrl*****");
?>thanks for your help.
.dok