Hi!
I am loading a page into a WebView. The page has this little-test Javascript:
<script type="text/javascript">
function test(parametr)
{
$('#testspan').html(parametr);
}
var bdu = (function(){
return {
secondtest: function(parametr) {
$('#testspan').html(parametr);
}
}
})();
</script>
The problem is that I can't call the "secondtest" function from cocoa
this is perfectly work:
[[webview1 windowScriptObject] callWebScriptMethod:@"test" withArguments:arguments];
and this is not working:
[[webview1 windowScriptObject] callWebScriptMethod:@"bdu.secondtest" withArguments:arguments];
What would cause this problem and how do I fix it?
Thanks