I have a xbap application and i would like a javascript button to call a function from this application. I've read something on Internet and it seems i have to use either a webcontrol (is that correct?) or an object control whom to pass an id or something. How should i do that exactly? A small Vb.Net example would be useful.
Let's assume i have this class:
Class Page1
Public Sub Callback()
MsgBox("Something")
End Sub
End Class
And i have a html file with an iframe that looks like this:
<html>
</head>
<script>
function something() {
var ctrl = document.getElementById("testControl");
ctrl.Callback();
}
</script>
</head>
<body>
<object id="testControl" name="testControl" classid="clsid: ..." width="0" height="0"></object>
<input type="button" value="Change Size" onclick="something()" />
<br/>
<script>
document.write('<iframe id="frame1" name="frame1" width="200" height="197" src="http:// .... .xbap?id=' + 1 + '" frameborder="1" border="1" style="border: 1px solid #000000;" />');
</script>
</body>
</html>
How should i configure my vb.net class and html file so that it works? thank you.