I have a radalert that we are trying to load HTML content into server side. For some reason if there are multiple paragraph tags it causes the javascript to error with "Invalid or unexpected token". It looks like it placed the 2nd paragraph on a new line. Is there a workaround for something like this?
This is what is rendered when there are multiple paragraph tags and the error is thrown:
<script type=
'text/javascript'
id=
'7221d910'
>
function
RadWindowManager1_radalert_7221d910()
{
$find(
'RadWindowManager1'
).radalert('<p><strong><span style=
"font-size: 24px;"
>This is the <span style=
"color: #c00000;"
>sold out</span> message </span></strong></p>
<p><strong><span style=
"font-size: 24px;"
>Just another paragraph</span></strong></p>
', null, null, '
Sold Out
', null, '
null
');
Sys.Application.remove_load(RadWindowManager1_radalert_7221d910);
var
scriptBlock = document.getElementById(
'7221d910'
);
if
(scriptBlock)
{
var
parent = scriptBlock.parentNode;
if
(parent) parent.removeChild(scriptBlock);
}
};
Sys.Application.add_load(RadWindowManager1_radalert_7221d910);</script>
This throws the error:
<
p
><
strong
><
span
style
=
"font-size: 24px;"
>This is the <
span
style
=
"color: #c00000;"
>sold out</
span
> message </
span
></
strong
></
p
> <
p
><
strong
><
span
style
=
"font-size: 24px;"
>Just another paragraph</
span
></
strong
></
p
>
This works correctly:
<
p
><
strong
><
span
style
=
"font-size: 24px;"
>This is the <
span
style
=
"color: #c00000;"
>sold out</
span
> message </
span
></
strong
><
strong
><
span
style
=
"font-size: 24px;"
>Just another paragraph</
span
></
strong
></
p
>