How to use fallback in html file. The fallback page is simply working in .cshtml.
I don't want to use with .cshtml file extension. The page should completely run with .html extension. Our clients need all the fallback chat application as html page.
The below code is not running as fallback in .html.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>XSockets - Simple PubSub With Fallback</title>
</head>
<body>
<label>Username</label><br />
<input type="text" id="username" value="Steve" /><br />
<label>Message</label><br />
<input type="text" value="Hello World" id="message" /><button id="send">send</button>
<hr />
<div data-bind="foreach:messages">
<div>
<span data-bind="text:username"></span>: <span data-bind="text:message"></span>
</div>
</div>
<script src="/Scripts/jquery-1.9.0.js"></script>
<script src="/Scripts/knockout-3.2.0.js"></script>
<script type="text/javascript">
//VM
var vm = { messages: ko.observableArray([]) };
ko.applyBindings(vm);
//Connect to the built in "Generic" controller
var controller = conn.controller('chat');
//Setup a subscription for the topic "chatmessage"
controller.subscribe('chatmessage', function (d) {
vm.messages.unshift(d);
});
//When button is clicked, publish a chat-message
document.querySelector("#send").onclick = function () {
var u = document.querySelector('#username').value;
var m = document.querySelector('#message').value;
controller.publish('chatmessage', { username: u, message: m });
};
</script>
</body>
</html>