I have a Webrowser with some settings that are changed using javascript. I’m trying to use the example here but can’t get the correct syntax
the script looks like this
<div class="DisplayInput"><input type="radio" name="displaytype"
value="decimal" onclick="setdisplayType('decimal');" checked="checked"><a
href="javaScript:setdisplayType('decimal');"
onclick="s_objectID="javascript:setdisplayType('decimal');_1";return this.s_oc? this.s_oc(e):true">Decimal</a></div>
So far I’ve tried these with no success
this.webBrowser1.InvokeScript("setdisplayType");
this.webBrowser1.InvokeScript("setdisplayType('decimal')");
this.webBrowser1.InvokeScript("setdisplayType","decimal");
Without knowing what’s happening with your application’s error and also not knowing what
setdisplayTypelooks like, I’m guessing that maybe you’re trying to invoke the functionsetdisplayTypebefore it’s been loaded. Per the MSDN documentation…Maybe you can implement the
LoadCompletedevent handler and then invoke your script.Hope this helps!