tabbar setContentHTML not able to handle dbl quote character

Dear Sir,



I’ve an html text including both single quote & dbl quote char on tabbar.setContentHTML as below









I’ve already tried put the escape character \ with every dbl quote

but I m not able to put it on tab content



can you give me some help?

Many Thanks!





Vincent


Hello,


The following code works locally:


tabbar.setContentHTML(tabId,"");




I notice there are some limitation on using setContentHTML

1) the enclosed html content can only be in one single line
i.e.
tabbar.setContentHTML(tabId,“

LINE1.0 LINE1.1 LINE1.2
”);
This is OK

tabbar.setContentHTML(tabId,“
                                                    
                                                           
                                                           
                                                    
LINE1.0 LINE1.1 LINE1.2
”);

This is NOT OK

2) Even the enclosed html content in one single line, the code will fail if the line is too long.

I’ve attached an example for this problem.
the tabbar is OK if you remove the “tabbar.setContentHref(“h1”,”<table class=…"
otherwise you will get a blank tabbar.

Is there any other way to display the complex tabbar content without using tabbar.setHrefMode(“ajax-html”) mode?

Many thanks!
Vincent



dhtmlxTab_test4.html.zip (1.62 KB)


Hello,


Regarding the first problem - it is correct behaviour. As, the following string isn’t correct:


"





LINE1.0 LINE1.1 LINE1.2
"


Just try to do the following:



str = "



LINE1.0 LINE1.1 LINE1.2



alert(str)


You will get the error.


>> the tabbar is OK if you remove the “tabbar.setContentHref(“h1”,”<table class=…“


setContentHref can be used only url.


If you want to use html string, you should use setContentHTML:


tabbar.setContentHTML(“h1”,”<table class=…”);



It is my typo mistake.
Thanks Alex!!!  :slight_smile: