Forum Moderators: open
I was wondering as to whether this is legal:
[pre]Response.Write('<script type="text/javas' + 'cript" src="src/cli/lvemail.js" defer></script>');[/pre] Also:
- why does one have to break down the javascript in the string?
- and what about the script tag (<script...)? Could that not be misunderstood by a browser?
Thanks,
Dave
There's no reason to split up the word Javascript or script on the Server Side. You seem to be mixing up what you have to do in client-side Javascript when you use document.write and there you have to split the script tag up because the browser tries to interpret it as the start of a script block.
I think you will find that you will need to use Response.Write("...")
[pre]<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>[/pre] and there you have to split the script tag up because the browser tries to interpret it as the start of a script block.
Thank you very much.
Dave