Fast, Flexible & Easy
Discussions  >  RichTextBox  >  Bugs & related  >  VS 2012 and RichTextBox getting script error
You are not logged in
 
PhillipR
Topics : 1Replies : 0User type : StandardRegister : 2013-Apr-09
0  [+]  [-]   report  reply  

I'm trying to pass this content from a sql database and get script error, script1015: Unterminated string constant

ml.TBRich.initialize('ctl00mContentmlRichTextBox', {"Html":"<H6><FONT size=5 face=Garamond>AKC Pomeranians Dog Breeding Kennel</FONT></H6>

I have no problem viewing the data with textbox.

<H6><FONT size=5 face=Garamond>AKC Pomeranians Dog Breeding Kennel</FONT></H6>
<P><FONT face=Georgia>Our home and kennel is located in the foothills of the beautiful Pacific Northwest, in Chehalis, Washington where the majestic mountains and the Pacific ocean meet. This is the heart of the Pacific Northwest, which embraces Washington and Oregon. We are located halfway between Seattle and Portland, and our climate is mild, with little snow and rarely, a heavy freeze. We have plenty of rain, which makes the countryside lush and green year round. We are about 50 miles from the sandy beaches of the Pacific ocean. </FONT></P>
<P><FONT face=Georgia>A few miles beyond our home is mountains, where wild game includes bear, cougar, bobcat, deer, elk, coyote and all kinds of waterfowl. We regularly see herds of elk and deer, and hundreds of wild geese. This area is also well known for its beautiful lakes and fantastic resorts. </FONT></P>

Rasmus
Topics : 5Replies : 7User type : AdminRegister : 2012-Dec-21
0  [+]  [-]   report  reply  

Hi Phillip

I have tried the following without any error :

string initialHtml = "<H6><FONT size=5 face=Garamond>AKC Pomeranians Dog Breeding Kennel</FONT></H6><P><FONT face=Georgia>Our home and kennel is located in the foothills of the beautiful Pacific Northwest, in Chehalis, Washington where the majestic mountains and the Pacific ocean meet. This is the heart of the Pacific Northwest, which embraces Washington and Oregon. We are located halfway between Seattle and Portland, and our climate is mild, with little snow and rarely, a heavy freeze. We have plenty of rain, which makes the countryside lush and green year round. We are about 50 miles from the sandy beaches of the Pacific ocean. </FONT></P><P><FONT face=Georgia>A few miles beyond our home is mountains, where wild game includes bear, cougar, bobcat, deer, elk, coyote and all kinds of waterfowl. We regularly see herds of elk and deer, and hundreds of wild geese. This area is also well known for its beautiful lakes and fantastic resorts. </FONT></P>";
mlRichTextBox.mlHtml = initialHtml;
Please email me your code (just the .aspx & .aspx.cs on which you get the error) and the exact string that you use to initialize RichTextBox.
My email is rasmus@menulab.com
Fiddles @ webmodelling.com
ertan
Topics : 0Replies : 1User type : StandardRegister : 2014-Jan-17
0  [+]  [-]   report  reply  

Hi Rasmus

i sometimes have error(which script5007 unable to get value of the property 'innerhtml' object is null or undefined) in ie9 when i am using richtextbox

Do you think edit mlRichTextBox about error that innerhtml ie9 problem or do you have any solution.

Thanks... 

Ertan

Rasmus
Topics : 5Replies : 7User type : AdminRegister : 2012-Dec-21
0  [+]  [-]   report  reply  
Hi ertan

I am not aware of the error you mention. Would it be possible for you to send me the aspx and aspx.cs/vb file in which you get the error ? 
I would be very interested in replicating the error myself.
You can email me at rasmus@menulab.com
Fiddles @ webmodelling.com

Terms & Conditions    |    Privacy Policy    |    Sitemap    |    Copyright © Menulab 2012. All rights reserved.