|
Rank: Newbie Groups: Member
Joined: 5/25/2018 Posts: 6
|
Good day,
I'm using the EvalScript to run several "document.createElement" statements to populate a EOWebBrowser control, that's running on a C# desktop project
However using createElement('img') and then either setAttribute or document.getElementById(elementName).src = "myimage.png" is giving me just a blank space with no image displayed. I am appending the created image element to a <div> using appendChild and what I end up is a blank "placeholder". If I try to check the "html source" of the EOWebBrowser after running my scripts, I end up with valid html that I can paste on a blank txt and see the result I want, but I can't see it on my code project during runtime.
The image I want to see is located on my local computer.
Do I need to call some additional method of the browser to re-render the control? Is there a limitation when using createElement?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi, You can use the built-in debugger feature to debug your script. You can either use the remote debugger feature as outlined here: https://www.essentialobjects.com/doc/webbrowser/advanced/remote_debug.aspxOr if you use our TabbedBrowser sample application, you can click the menu button and then select "Show Debug UI" from the drop down menu. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 5/25/2018 Posts: 6
|
Hi,
I was able to get this to work. It was an issue with the relative paths and no prior URL set to the controller for finding local images. I set the URL of the control to a blank html and I was able to get this to work. Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Great. Glad to see that you got it working!
|
|