Community
Showing results for 
Search instead for 
Do you mean 
Reply

Browser problems

Tuned Listener
Posts: 23
Country: UK

Browser problems

[ Edited ]
Hi,
I'm trying to display data from a database in a browser instance hosted in a tab on the CompanyView screen in Act! I set the value of the DocumentText property from a method called from the CompanyChanged Event. The first time I set the browser text I get a blank page. Debugging in VS or doing a view source shows me "<html></html>". Subsequent changes show up and work fine, even if I return to the first company that failed the first time round.

Is there an issue with populating a browser object when it is not currently displayed?

I've tried setting the DocumentStream property and writing to file and using navigate but I seem to get the same behaviour no matter what. Does anyone have any ideas?

Regards,
Russell

Message Edited by russell on 02-06-2008 02:18 PM
Copper Contributor
Posts: 61
Country: USA

Re: Browser problems

Hi Russell,
 
I have developed an add-on with the WebBrowser control ( http://community.act.com/sage/blog/article?message.uid=171) and found it very "picky", so although I have not encountered your issue specifically, I would not doubt that you may indeed be right on this one.
 
Some suggestions:
You can update your code to only do the "work" when your control is visible (which is set if the tab page where your control lives is clicked).  Check out my blog about this tip: http://community.act.com/sage/blog/article?message.uid=169
Otherwise, a long time ago, I remember having to access the browser property InnerHTML of the document object in the browser control and set that to the HTML you want...but I cannot locate that piece of code anymore...
 
Hope one of the above works out :-) let us know...
 
Pierre
Tuned Listener
Posts: 23
Country: UK

Re: Browser problems

[ Edited ]
Thanks for your reply Pierre,

I've tried the code in your example and I'm still having issues. I've even added code to the Enter event on the tabpage the control is sitting on and i still get the same behaviour.

I'm starting to get the feeling that it's one of those crazy 1 line errors that will be so obvious if I take my head out of the code for a while so I'm going to take some time to work through a couple of other issues and come back to it later.

Regards, Russell

Message Edited by russell on 02-08-2008 09:58 AM
Copper Elite Contributor
Posts: 95
Country: USA

Re: Browser problems

try calling a currentcompany.update() before you try to pull any data off the record, the problem was a lot worse back in act 7.
Nick Bohne
Effective Solutions, Inc.