On Sat, 14 Feb 2004 19:08:05 -0800, mscir <mscir@access4less.net> wrote:
[color=blue]
> <html>
> <title>CodeAve.com(JavaScript New Window within Previous Page)</title>
> <body bgcolor="#FFFFFF">[/color]
Why don't you add this to the CSS rules below?
body {
background-color: #ffffff;
}
[color=blue]
> <script language="JavaScript">[/color]
Missing the required type attribute. Change to:
<script type="text/javascript">
[color=blue]
> <!--[/color]
Don't use SGML comments in script blocks
[color=blue]
> function open_new_window() {
> new_window =
> open("","displayWindow","width=575,height=290,left =10,top=10");
>
> // open new document
> new_window.document.open();
>
> // Text of the new document goes here
> // Replace your " with ' or \" or your document.write statements will //
> fail[/color]
Or use single quotes for the document.write statements and escape
apostrophes.
[color=blue]
> new_window.document.write("<html>");[/color]
No DOCTYPE? Tsk, tsk.
[snip]
[color=blue]
> </script><a onclick="open_new_window()"
> style="cursor:pointer;cursor:hand;" >[/color]
You do realise that the first rule (cursor: pointer) in the style
attribute above is totally useless, don't you?
[color=blue]
> <font color="#008080"><u>Open New Window</u></font></a>[/color]
Again, why not use a CSS rule instead of deprecated elements?
a {
color: #008080;
cursor: hand;
text-decoration: underline;
}
[color=blue]
> </body>
> </html>[/color]
Mike
--
Michael Winter
M.Winter@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)