This is the php and html code I am using motion to stream video in it
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<?php
if (isset($_POST['LightBLINK']))
{
exec("sudo python /var/www/html/open.py");
}
?>
<form method="post">
<button class="btn" name="LightBLINK">Light BLINK</button><br><br></form>
<body>
<h1>Raspberry Pi Webcameras</h1>
<a href="http://192.168.1.3:8081/">
<img src="http://192.168.1.3:8081/" alt="Camera 1" ></a>
<a href="http://192.168.1.3:8082/">
<img src="http://192.168.1.3:8082/" alt="Camera 2" ></a>
</body>
</html>
The problem is that when I click the "LIGH BLINK" button it executes the open.py script but along with it the complete web page refreshes which causes the embedded pages(video in my case) to refresh.
The thing i want is that when i click the "LIGHT BLINK" button it should execute the open.py script as before . but donot refresh the whole page so that my video feed remains undisturbed.