By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
463,151 Members | 711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 463,151 IT Pros & Developers. It's quick & easy.

How get: <script>"some HTML here... <noscript>Other HTML here... ?

P: 31
I have a lot of nicely formatted HTML to be displayed for visitors WITHOUT script (/enabled), and a second set of HTML for those WITH script.

The <noscript> tag allows me to separate the HTML for those without script,
How can I separate the HTML for those with script? (ie not run for those without script enabled.

The only way I've found so far is:

This should only be diplayed when scripting is not configured
document.write(" X This should only display when script IS configured X ");
// -->

but requires me to put all the 2nd set of HTML between the X's - all in one long VERY ine

Ideally, of course I would like to keep the good formatting for ease of maintenance/understanding.

Is there a much better way (I hope ;-) - thanks
Sep 28 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
How about using multiple document.write statements?

Or create a string and pass that to the document.write().
Sep 29 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.