This has its problems though, as these were never intended to hold more than a line or two of imbedded html at the item level.
In PERL there is a way to assign large blocks of html without having to escape special chars (like single and double quotes) by setting the variable using a user specified set of delimiters.
Does anyone know of a way to do this in javascript?
So that I could (for example) do something like this..
Code: Select all
var theTextBlock = ||| /* the three ||| would be my custom delimiters */
<table background="#FFCCFF">
<tr>
<td>
some content goes here
</td>
<td>
some more content
</td>
</tr>
</table>
|||;
And, I could also place the background parameter in the table declaration inside of double quotes.
This is a simple example, and for all intents and purposes would not need to be imbedded between custom delimiters; but there are more complex examples where I could justify such a need.
Then, I could use the variable thusly..
Code: Select all
// Example, using a variable to insert my text block when "type=html"
with(milonic=new menuname("MyTest")){
style=MyTestStyle;
aI("type=html;text=" + theTextBlock + ";");
}