PDA

View Full Version : Opposite NoScript Tag?


Jason_Beaudoin
03-24-2003, 07:04 PM
Does anyone know whether there is an HTML tag that behaves exactly the opposite to the NoScript tag? In other words, is there a tag that will display HTML only if browser scripting is turned on?

If not, does anyone know how to write HTML that is embeded into Java Script?

Thanks in advance!
:thumbsup:

brothercake
03-24-2003, 07:07 PM
The opposite of the <noscript> tag is the <script> tag. But you can't say "here's some static HTML which only script-capable browsers can display".

You want to write HTML embedded into javascript. Here's a very simple example:

var html = '';
html += '<p>Hello world</p>';
document.write(html);

Jason_Beaudoin
03-24-2003, 07:10 PM
Wow! That was fast! Thanks! This is all I need.

brothercake
03-24-2003, 07:23 PM
No worries, and welcome to the forum :)