Solved

Text in a new window

Posted on 1998-08-10
3
168 Views
Last Modified: 2010-04-09
I need to access txt files and see them on the screen. I  currently link to the txt file and it shows up as a full
screen. In order to return, you must hit the Back button.  How do I call the fill up to be seen in a new window
so that I can still view info on the main screen??
0
Comment
Question by:architec
3 Comments
 
LVL 2

Expert Comment

by:Serg
ID: 1845143
Sounds more like JavaScript Question...

if you want to have it as a link then you should use something like this...[open.window]
which will link to txt and open a new window, you can also modify the defoult size for the new window
But once again this is much easier done in JavaScript....if i understand you right ofcourse
perhaps you should re-post this to that section.
0
 
LVL 4

Accepted Solution

by:
mitek earned 50 total points
ID: 1845144
I already answered a similar question a while ago, so I'll just reiterate what has been said ...  

<HEADER>
<SCRIPT LANGUAGE="JavaScript">
<!--
function openWin(URL,win_name) {
  help_win=window.open(URL,win_name,"width=450,height=400,scrollbars");
  help_win.focus();
}
// -->
</SCRIPT>

</HEADER>

<BODY>
 

<A HREF="javascript:openWin('fname_win1.txt','win1');">Click to open a new window</A>

 

<A HREF="javascript:openWin('fname_win2.txt','win2');">Click to open another window</A>

 
</BODY>

An even simpler way would be just to use TARGET attribute, like

<A HREF="text.txt" TARGET="win1">Click to open new window</A>

But the first way is much better, since it gives you control over attributes of the window, like whether it has scrollbars, allows you to specify the dimensions, etc.

0
 
LVL 2

Expert Comment

by:SirCaleb
ID: 1845145
Even easier than that, why not do this...

<a href="textfile.txt" target="xyz">Text Document</a>

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now