Solved

Text in a new window

Posted on 1998-08-10
3
170 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help to align the buttons in a row 2 43
CSS: Making responsive table look nicer 7 31
parse url to form? 7 25
Button function on table is in trouble 3 20
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

856 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