Print Page | Close Window

.InnerHTML limited to 255 chrs

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Active-X COM Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=9911
Printed Date: 02 May 2024 at 1:11pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: .InnerHTML limited to 255 chrs
Posted By: PPL1
Subject: .InnerHTML limited to 255 chrs
Date Posted: 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 ?



Replies:
Posted By: Oleg
Date 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


Posted By: PPL1
Date Posted: 17 March 2008 at 1:55pm
This VB code works:
  s = "Web site : <a href="" http://www.sqlnotes.net - http://www.sqlnotes.net "" target=""_blank"" Title="" - www.SQLNotes.nethttp://www.sqlnotes.net"">www.SQLNotes.net</a > &nbsp; &nbsp; "
  s = s & "<a href="" http://www.sqlnotes.net/Forums/tabid/54/Default.aspx - 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 - http://www.sqlnotes.net "" target=""_blank"" Title="" - www.SQLNotes.nethttp://www.sqlnotes.net"">www.SQLNotes.net</a > &nbsp; &nbsp; "
  s = s & "<a href="" http://www.sqlnotes.net/Forums/tabid/54/Default.aspx - 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 - http://www.sqlnotes.net " Title=" - www.SQLNotes.nethttp://www.sqlnotes.net">www.SQLNotes.net</a > &nbsp; &nbsp; <a href=" http://www.sqlnotes.net/Forums/tabid/54/Default.aspx - http://www.sqlnotes.net/Forums/tabid/54/Default.aspx "  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
 


Posted By: Oleg
Date Posted: 18 March 2008 at 5:57am

Hi,

Again Both work with ANSI and Unicode.

Here sample project: https://forum.codejock.com/uploads/20080318_055746_WebBrowser.zip - WebBrowser.zip

 
Maybe it depends on IE version... Please check if attachment works for you.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: PPL1
Date 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


Posted By: nighthawk
Date 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.


Posted By: Aaron
Date Posted: 20 March 2008 at 12:59am
Hi,
 
I tried the sample with IE7 and it works.


Posted By: Oleg
Date 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


Posted By: PPL1
Date 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 ?)


Posted By: Oleg
Date 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 - http://www.sqlnotes.net "" target=""_blank"" Title="" - www.SQLNotes.netwww.SQLNotes.nethttp://www.sqlnotes.net"">www.SQLNotes.net</a > &nbsp; &nbsp; "
 s = s & "<a href="" http://www.sqlnotes.net/Forums/tabid/54/Default.aspx - 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


Posted By: PPL1
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net