I have a javascript function called ShowActiveLink to which I pass a
full <a href="blah.htm"
onClick="javasc ript:newWindow( 'quotedStuff'); "> link. (See below.)
---------------
<script language="javas cript">void ShowActiveLink( '<a
href="javascrip t:newWindow('ht tp://www.vre.org/');"
target="_blank" >VRE Service Status</a>');</script>
<a href="javascrip t:newWindow('ht tp://www.vre.org/vremap/app?action=ovma p');"
target="_blank" >VRE Service Status</a></li>
---------------
My problem is that I have no method of escaping the single quotes in
newWindow('') because the entire <a href> is placed there dynamically
by our content management system when the file is generated.
I've thought of
void ShowActiveLink( escape('<a href="javascrip t:newWindow('.. .')'));
but it doesn't work because of the single quotes contained within the
<a href>. I thought of using VBScript, but that doesn't work either
since the double quotes in the link cause the string to close too
early and the compiler blows up.
Keeping in mind that I can't manually escape the href, what can I do
now?
full <a href="blah.htm"
onClick="javasc ript:newWindow( 'quotedStuff'); "> link. (See below.)
---------------
<script language="javas cript">void ShowActiveLink( '<a
href="javascrip t:newWindow('ht tp://www.vre.org/');"
target="_blank" >VRE Service Status</a>');</script>
<a href="javascrip t:newWindow('ht tp://www.vre.org/vremap/app?action=ovma p');"
target="_blank" >VRE Service Status</a></li>
---------------
My problem is that I have no method of escaping the single quotes in
newWindow('') because the entire <a href> is placed there dynamically
by our content management system when the file is generated.
I've thought of
void ShowActiveLink( escape('<a href="javascrip t:newWindow('.. .')'));
but it doesn't work because of the single quotes contained within the
<a href>. I thought of using VBScript, but that doesn't work either
since the double quotes in the link cause the string to close too
early and the compiler blows up.
Keeping in mind that I can't manually escape the href, what can I do
now?
Comment