"James" <tvwatchr2@NO_SPAMearthlink.net> wrote in message
news:sh*************@newsread2.news.pas.earthlink. net...
Hello NG,
I have been making all my web pages in HTML and I just started using
JavaScript yesterday and ran into a brick wall!
I can get the escape character " \n " or document.writeln to give me a
new line.
Or for that matter any of the form feed " \f " or carriage return " \r
" to work either.
I can get the escape character " \" "
I'm using XP home with SP2 with IE6 all my security setting set to Prompt
so if that was an issue then at least I should get a prompt for allowing
the script to work.
I put my JavaScript in a .js file and have referenced it from the HTML
page. I've tried this on different machines that also use XP with IE6, is this a
problem with IE?
I've tried
<script type= "text/javascript" src="assets/beagle.js">
and
<script language="JavaScript1.2" src="assets/beagle.js">
Any ideas as to where I'm going wrong?
================================================== =========
here is the HTML part
<html>
<head>
<title> Welcome to my Beagle Page</title>
<!-- place all scripts below, in this area -->
<script language="JavaScript1.2" src="assets/beagle.js">
<!--
-->
</script>
<!-- place all scripts above, in this area -->
</head>
<body>
<CENTER><H1><FONT COLOR="#0000FF">Beagle Page</FONT></H1></CENTER>
</body>
</html>
================================================== ===========
and here is the beagle.js file
document.writeln("\"Welcome to my site! \"");
document.writeln("\n")
document.writeln
document.writeln("This page created by James Last update:\n" +
document.lastModified);
document.bgColor="black"
document.fgColor="#336699"
window.alert("Welcome to my site!")
================================================== =============
Thaks for any suggestions
James
"Go outside - the graphics are amazing!"
You are using JavaScript to render HTML; therefore,
use "<br>" not "\n".
Here it is without the "include". Watch for word-wrap.
<html>
<head>
<title>Welcome to my Beagle Page</title>
<script type="text/javascript">
document.writeln("\"Welcome to my site! \"");
document.writeln("<br>This page created by James Last update:<br>" +
document.lastModified);
document.bgColor="black"
document.fgColor="#336699"
window.alert("Welcome to my site!")
</script>
</head>
<body>
<CENTER><H1><FONT COLOR="#0000FF">
Beagle Page</FONT></H1></CENTER>
</body>
</html>
It's not too readable with that color scheme!