Re: setting up a new window/reflected page

by Nathan Lyle <natlyle(at)nmu.edu>

 Date:  Wed, 16 Aug 2000 10:39:10 -0400
 To:  "Christie Cooksey" <christie(at)thearmidalemall.com>
 Cc:  hwg-techniques <hwg-techniques(at)hwg.org>
 References: 
  todo: View Thread, Original
Actually, that's more like what I ended up doing rather than what I tried
to start out doing. My first thought was something like this:

<script language="javascript">
var text="<html><body bgcolor=#ffffff>Hello there</body></html>";
open(text,"New
Window","toolbar=no,location=no,directories=no,status=no,menubar=no");
</script>

So that all the HTML was written prior to the actual window being opened.
But that didn't seem to work. I guess the first spot in the open call
(Where I have "text" above) will take a URL but not a variable that's *not*
a URL. I was wondering if there was a way around it. (There always seem to
be ways around everything with HTML/javascript, etc. Part of the reason
it's so much fun to play with.)   :)




>You mean like this???
>
><SCRIPT language=JavaScript>
>config='toolbar=no,location=no,directories=no,status=no,menubar=no,width=200
>,height=200'
>config += 'scrollbars=no,resizable=no'
>pop = window.open ("","pop",config)
>pop.document.write('<script language="javascript">');
>pop.document.write('setTimeout(');
>pop.document.write('"self.close()');
>pop.document.write(';",8000)');
>pop.document.write('</');
>pop.document.write('script>');
>pop.document.write('<body bgcolor=black text=white>');
>pop.document.write('<center><b><font face="verdana, helvetica"
>size="3">cLick <br>Up Coming...</font></b></center><p>');
>pop.document.write('<center><b><font face="Arial, helvetica" size="2"
>color="#C0C0C0">Look for us at the
>Eisteddfod</font></b></center><br><br><br>');
>pop.document.write('<center><font face="Arial, helvetica" size="1">This
>window will close automatically</font></center><p>');
>pop.document.write('</body>');
></SCRIPT>
>
>
>Cheers  :0)
>Christie Cooksey
>Websites "Designed by Christie"
>http://www.designedbychristie.com
>TheArmidaleMall
>http://www.thearmidalemall.com
>FREE Banner Exchange
>http://www.thearmidalemall.com/bp/
>
>----- Original Message -----
>From: "Nathan Lyle" <natlyle(at)nmu.edu>
>To: "hwg-techniques" <hwg-techniques(at)hwg.org>
>Sent: Wednesday, August 16, 2000 1:34 PM
>Subject: setting up a new window/reflected page
>
>
>> Javascript question:
>>
>> Right now I have a page with links that pops open a smaller window that
>> contains misc. info related to that link. Originally, I had tried to
>create
>> the text for that new page via javascript and then import that into the
>> command to open a new window. I thought I'd seen this done somewhere
>> before. I tried a bunch of ways (like  var new_text = "<html><body
>> bgcolor=#ffffff>...etc.";   open(new_text,"New page","");) and various
>ways
>> of jiggling the command structure to get that approach to work, only it
>> never did.
>>
>> The way I have it now, I open the new window, then the script in the
>> original page just writes to that window. This works, but my curiosity
>> isn't satisfied. Am I right in thinking there's a way to pack javascript
>> relfected HTML into a variable and then into the open() call?
>>
>> Thanks for any ideas....
>>
>> ~Nathan Lyle - Web Design/Instruction
>>
>>        E-Mail: natlyle(at)nmu.edu    or   jopling(at)geocities.com
>>        Web: http://vm.nmu.edu/~natlyle
>>        Phone: 906-227-5736
>>        Address: 1701 Lincoln Ave. #14, Marquette, MI 49855
>>
>>        "Creativity is more important than knowledge."
>>                     - Albert Einstein
>>
>>


~Nathan Lyle - Web Design/Instruction

       E-Mail: natlyle(at)nmu.edu    or   jopling(at)geocities.com
       Web: http://vm.nmu.edu/~natlyle
       Phone: 906-227-5736
       Address: 1701 Lincoln Ave. #14, Marquette, MI 49855

       "Creativity is more important than knowledge."
                    - Albert Einstein

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA