Welcome Guest Search | Active Topics | Sign In | Register

creating an image element on EOWebBrowser, src is updated but the image won't display. Options
mcontreras
Posted: Friday, May 25, 2018 6:22:16 PM
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?
eo_support
Posted: Wednesday, May 30, 2018 3:47:30 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
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.aspx

Or 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!
mcontreras
Posted: Thursday, June 14, 2018 4:36:23 PM
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!
eo_support
Posted: Friday, June 15, 2018 3:19:51 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Great. Glad to see that you got it working!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.