logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
younger  
#1 Posted : Monday, August 14, 2023 8:13:50 PM(UTC)
younger

Rank: Newbie

Groups: Registered
Joined: 8/14/2023(UTC)
Posts: 1
Germany

Hi,

try to program a simple webcontroller with html for an operator, who should not use the standard controller. The html-code below works, if i open it as a file with a browser. Router and vMix are well configured (this url e.g. pasted directly works from any external browser: http://nameofdomain.com:8088/api/?Function=Cut&Value=Preview).
Has anybody an idea? It seems that javascript is not executed in case of external hosting.

rgds
Dirk



<!DOCTYPE html>
<html>
<head>
<style>
.button {
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
.button1 {background-color: #4CAF50;} /* Green */
</style>

<script>
function httpGet(theUrl) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", theUrl, true); // false for synchronous request
xmlHttp.send(null);
return xmlHttp.responseText;
}
</script>

</head>
<body>
<button class="button button1" onclick="javaschript:httpGet('http://nameofdomain.com:8088/api/?Function=Cut&Value=Preview');">Cut</button>

</body>
</html>
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.