hi I am wondering if anyone could help me add this code to a block when I do it shows all the code in the block instead of what its supposed to be showing. I am using an html/java block and this is the code.
<center>
// ***********************************************
// AUTHOR: WWW.CGISCRIPT.NET, LLC
// URL: http://www.cgiscript.net
// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// ( http://www.cgiscript.net/scripts.htm )
// ***********************************************
// for NN4/IE4
if (self.screen) {
width = screen.width
height = screen.height
}
// for NN3 w/Java
else if (self.java) {
var javakit = java.awt.Toolkit.getDefaultToolkit();
var scrsize = javakit.getScreenSize();
width = scrsize.width;
height = scrsize.height;
}
else {
// N2, E3, N3 w/o Java (Opera and WebTV)
width = height = '?'
}
document.write("Your Screen Resolution is set to: "+ width +"Ãâ€""+ height)
//-->
</script><br/>
We Recommend using Mozilla Firefox @ 1280x800 or higher <<-- only edit this bit
</center>
When you put the code in the editor, you must put the editor into code mode. You can do this by clicking the <> button. Then you will need to put your code in and save it.
thats what I am doing.
Then there is probably something wrong with your code.
Shouldn't there be a Script <script> tag to start the code somewhere, as there is a closing tag </script> ???
One reason all the text is shown is that there are no script tags in the code. Give us a link to the actual script so that we can try it.
ZarPrime
Edit: Ah, pipped by Les. Sorry about that Les. :D
OK fixed it should be like this...
<center>
<script type="text/javascript">
// ***********************************************
// AUTHOR: WWW.CGISCRIPT.NET, LLC
// URL: http://www.cgiscript.net
// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// ( http://www.cgiscript.net/scripts.htm )
// ***********************************************
// for NN4/IE4
if (self.screen) {
width = screen.width
height = screen.height
}
// for NN3 w/Java
else if (self.java) {
var javakit = java.awt.Toolkit.getDefaultToolkit();
var scrsize = javakit.getScreenSize();
width = scrsize.width;
height = scrsize.height;
}
else {
// N2, E3, N3 w/o Java (Opera and WebTV)
width = height = '?'
}
document.write("Your Screen Resolution is set to: "+ width +"Ãâ€""+ height)
//-->
</script><br/>
We Recommend using Mozilla Firefox @ 1280x800 or higher <<-- only edit this bit
</center>
Lesmond's code works so I will mark this topic solved. O0
ZarPrime
Thank ZP, was waiting for the OP to get back thats why I did mark it O0