![]() |
.InnerHTML limited to 255 chrs |
Post Reply
|
| Author | |
PPL1
Groupie
Joined: 10 April 2006 Location: Canada Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Topic: .InnerHTML limited to 255 chrsPosted: 17 March 2008 at 12:40pm |
|
In the ActiveX Suite, the WebBrowser control InnerHTML property is limited to 255 chrs
. I hope this will be fixed soon...
Are there any workarounds using ExecWB or something else ?
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 March 2008 at 1:41pm |
|
Hi,
Just tried 350 chars - works without problems.
Can you show html/code you tried ?
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
PPL1
Groupie
Joined: 10 April 2006 Location: Canada Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 March 2008 at 1:55pm |
|
This VB code works:
s = "Web site : <a href=""http://www.sqlnotes.net"" target=""_blank"" Title=""www.SQLNotes.nethttp://www.sqlnotes.net"">www.SQLNotes.net</a> "
s = s & "<a href=""http://www.sqlnotes.net/Forums/tabid/54/Default.aspx"" target=""_blank"">Forums</a> " Me.txtWebSite.innerHTML = s But this does not:
s = "Web site and more text to show if there is a problem : <a href=""http://www.sqlnotes.net"" target=""_blank"" Title=""www.SQLNotes.nethttp://www.sqlnotes.net"">www.SQLNotes.net</a> "
s = s & "<a href=""http://www.sqlnotes.net/Forums/tabid/54/Default.aspx"" target=""_blank"" Title=""Forumshttp://www.sqlnotes.net"">Forums</a> " Me.txtWebSite.innerHTML = s I use the Unicode versions
In text mode, this does not work:
Web site and more text to show if there is a problem : <a href="http://www.sqlnotes.net" target="_blank" Title="www.SQLNotes.nethttp://www.sqlnotes.net">www.SQLNotes.net</a> <a href="http://www.sqlnotes.net/Forums/tabid/54/Default.aspx" target="_blank" Title="Forumshttp://www.sqlnotes.net">Forums</a>
But making the first text shorter works. I've tested and it stops working after exactly 259 chrs
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 March 2008 at 5:57am |
|
Hi, Again Both work with ANSI and Unicode. Here sample project: WebBrowser.zip Maybe it depends on IE version... Please check if attachment works for you.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
PPL1
Groupie
Joined: 10 April 2006 Location: Canada Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 March 2008 at 9:12am |
|
I tried your sample and it displays blank in the top one and "Page cannot be displayed" in the bottom.
I use IE 6 Win XP SP2 all updates applied
Using ActiveX .Unicode.v11.2.2
|
|
![]() |
|
nighthawk
Senior Member
Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 March 2008 at 6:42pm |
|
I noticed the same limit of only displaying around 250 characters. Thanks for bringing this up. I am getting the same results on Oleg's sample project (blank top and "Page cannot be displayed" on bottom). I am also using IE 6 with Win XP SP2.
|
|
![]() |
|
Aaron
Senior Member
Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 March 2008 at 12:59am |
|
Hi,
I tried the sample with IE7 and it works.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 March 2008 at 2:33am |
|
Hello,
Thanks, it indeed depends on IE version :( We fixed it for 12.0 release.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
PPL1
Groupie
Joined: 10 April 2006 Location: Canada Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 March 2008 at 11:19am |
|
OK. Going back to my original post, is there a workaround ? (using ExecWB or a link to the DOM ?)
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 March 2008 at 12:05pm |
|
Hi,
try this as workaround
Private Sub Form_Load()
WebBrowser1.Navigate "about:blank" End Sub Private Sub WebBrowser1_DownloadComplete()
s = "Web site and more text to show if there is a problem : <a href=""http://www.sqlnotes.net"" target=""_blank"" Title=""www.SQLNotes.netwww.SQLNotes.nethttp://www.sqlnotes.net"">www.SQLNotes.net</a> " s = s & "<a href=""http://www.sqlnotes.net/Forums/tabid/54/Default.aspx"" target=""_blank"" Title=""Forumshttp://www.sqlnotes.net"">Forums</a> " WebBrowser1.Document.Body.InnerHTML = s End Sub |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
PPL1
Groupie
Joined: 10 April 2006 Location: Canada Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Posted: 21 March 2008 at 6:46pm |
|
That works fine.
When loading many different strings however, I'll need to use some global variable to track which string to load. Not ideal but workable
Thanks
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() 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 |