Javascript / HTML Code
<script type="text/javascript">
function configurator(clicked) {
return clicked.name;
}
</script>
<a name="link1" href="#" onclick="configurator(this)">Link 1</a>
<a name="link2" href="#" onclick="configurator(this)">Link 2</a>
I want to return the "clicked.name" value to let's say "result" variable in C# when onclick event on the link triggered. I don't know how to do that. Could someone help me...
Note: I'm still very new to Awesomium :)
Update:
I follow @JonnyReeves method with a little modified:
using (JSObject myGlobalObject = webControl1.CreateGlobalJavascriptObject("myGlobalObject"))
{
myGlobalObject.Bind("onLinkClicked", true, (sen, eve) =>
{
MessageBox.Show(Convert.ToString(sen));
});
}
but I got "Awesomium.Windows.Controls.WebControl" as result not the clicked link's name.
returndata to the server, but you can make a separate request and pass the data along with it.