HTML - Opening File In New Window
I'm an html novice, and I'm trying to get a file to open in a new window and not replace the current screen. What can I add to this code and try?
<html> <head> </head> <body> <script type="text/javascript"> location.replace('http://www.company.com/file.pdf'); </script> </body> </html> Currently, when clicked in a doc library in Sharepoint, the file takes over the screen, which is what I want. However, the user can't use the back button to return to the previous screen. So, how can I change this code so the file pops in a new window but doesn't also take over the original window (since location.replace causes this)? Or is there code I can add which allows the user to use the back button in the ie browser? Thanks! I appreciate any help you can give! Nicole Similar TutorialsHello - I am a newbie to the forum needing assistance with some HTML coding. I am trying to create a page which has a number of small images acting as buttons. When an image is clicked, a new window is opened which displays that image in full size. I would like this page to contain a "Close Page" button which closes this page. Also, is there HTML code which prevents users from downloading images that appear in this new window? Addition: I have found javascript code which closes a browser window: <a href="javascript:window.close()"> <img border="0" src="closingwindows.gif" width="95" height="46"> </a> but where do you put this code, given that the new page to display the full size image is created from the page that contains the thumbnail of that image? Any help appreciated! Onesimus how can i make the open a new window code work as it is in this include file: <div id="footer"> <img src="images/footer.jpg" alt="" width="998" height="45" border="0" usemap="#footer" /> <map name="footer" id="Map2"> <area shape="rect" coords="0,0,162,45"href="http://www.myspace.com/spittinknowledge" alt="myspace" /> <area shape="rect" coords="184,0,308,45" href="affiliates.shtml" alt="affiliates" /> <area shape="rect" coords="328,0,482,45" href="#" onclick="MyWindow=window.open('webmaster.shtml','Contact Spittin-knowledge.com webmaster','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes, width=525,height=560'); return false;"></a> alt="webmaster" /> <area shape="rect" coords="501,0,655,45" href="disclaimer.shtml" alt="disclaimer" /> <area shape="rect" coords="672,0,998,45" href="#top"/> </map> </div><!-- end of nav --> heya guys i want to open a webpage in a new window when i click on a hotspot. can anyone tell me what i need to do? frosty I created a page with a chromeless window. Clicking on 'enter' on the index page will open the homepage in a chromeless window. However, whenever you click enter on the index page, the index page itself is also loading the homepage. (so it's double, one on the index page and one in a chromeless window). How can I get it to stop, so that it only loads a chromeless window and the index page stays the same? I used the chromeless window codes from the following page: http://www.lissaexplains.com/javascript9.shtml I have a link on my website that opens up a new window, and that new window opens up and is resized to be smaller at 400X300. It works just fine on Internet Explorer and Safari, but when it's in Firefox the new window opens up on a separate tab in the same browser window and causes the whole window to resize to 400X300. Is there a way to fix this? Like is there a better coding to make sure Firefox will open this link in a new window for sure, and not just a separate tab? I'm using the coding target="_blank" right now..... I'm a rookie so don't be too rough on the mistakes I made in the webby im about to post, but here's my prob http://mythgaming.gethost.nl I got 1 Iframe in the main page, which loads every link I click from the menu Now at the link MEMBERS, if I click it you get a Click here url, this contains a javascript that reopens a menu with a close button and normally an image in it My idea was to open a certain page in that "javascript application" but the problem is when I click "click here" it does open, but in the iframe itself, setting a target _blank doesn't work either as it'll stay in the Iframe So first problem would be, how can I get that javascript to be opened OUTSIDE the frame.. and with that how could I load a page in it -- <link rel="stylesheet" type="text/css" href="style.css" /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="" /> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta name="robots" content="all" /> <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="js/lightbox.js"></script> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> <title>Myth Academy | Managing system</title> <script type="text/javascript"></script> <style type="text/css" media="all"> @import url(style/style.css); </style> </head> <body> <tr> <td style='width:16px; height:16px;'> </td> <td width="50">Result:</td> <td colspan="3"><a href='http://mythgaming.gethost.nl/members/furian.php' title='Layout' rel='lightbox' target="_blank">Click here</a></td> </tr> </table> <hr size='1' style='color:#000000;' /></div> <div id="footer"> <p>Any questions? Mail ryze@dock-7.com </p> </div> </div> </body> </html> -- As you can see the url above "furian.php" is supposed to load inside the window that pops up if you click Click here.. that's not working, and also the window doesn't pop out from the Iframe but stays in there The actual code is taken from the http://mythgaming.gethost.nl/training/ page.. as you open a Photo there you'll see the normal "image popup" window I hope any of you have a suggestion how to fix this, and yea correct me on dumb mistakes i know I made many I take are of an internal site on our companies intranet. I have a set of 3 iframes for content. The problem I am experiencing is when a link I have in one of the content pages is clicked (target is already set to _blank) the link still opens inside the iframe. <a href="http://support.microsoft.com/kb/301583" target="_blank">Windows XP Shortcuts</a> that is the code on the site. like I said, this is on a page that gets loaded into an iframe Thanks for the help. Hello! I am attempting to use a standard link to make a .doc available both for download, and to open in a new instance of Word. When I use this - <a href="H:\Intranet Pages\Tax Intranet Checklists 2009\5500Checklist.doc" target="_blank" title="5500">5500</a> It will give me two things - a pop-up asking whether to open or save, and a fresh browser window - but if I select Open, the document opens in that new browser window. I want it to prompt Word and open in the actual program as "Read Only". Is this possible? If so, what coding should I use? Thanks! i have a site where there is an iframe. The iframe loads a page from another website which has links on it. when a person clicks on a link, it loads the next page within the iframe which is ok. This next page it load also contains links and when a person clicks one of these things, it then loads a checkout page within the iframe which is not so good at all as this page is secure, but because it exists within the iframe now, it wont show as secure to people viewing it. I would like to know how i can have the links from the next page mentioned load in a new tab or browser window so that the secure checkout page is now on its own and the https and secure padlock show to the user. Any help is greatly appreciate! how can i make an html code so i make Y! icon on web when some1 clicks it a chat window appears Hello, I want to open a html page in a same browser window with fullscreen mode. I tried following code: window.open("hello.html","_self","fullscreen,scrollbars") However if I use _self, I did not get page in fullscreen mode. Any help is really appreciated. Regards, John Okay here is the previous thread that lead me to this issue. http://www.htmlforums.com/html-xhtml...tml#post670803 It solved my issues of opening a new window based off of the selection in a drop down, how ever I have 13 drop downs and the script from the above thread only allows one drop down to work. The drop downs will increase, is there any way to get them all to work. Thanks dt_gry Hello I'm now well on my way to making my first website from html code. Please could someone give me the examples of: 1) Opening a link in current tab 2) Opening a link in new tab 3) Opening a link in a new window I cant open my php file...ive downloaded wampserver to support the file but it still doesnt open...wat could b the problem here??? Hi, Newby here - trying to make some link changes to an existing site and it has gone south for me. I have updated some java based links and it has blown up on me. They are trying to open as a file, rather than staying as a link. website address is dub, dub, dub nufinish dot ca. Small site, but trying to update it so that links operate properly. Thanks! Hendy Hey yall.. I have some pdf files on my website. When a user clicks on the download link, I would like to display a web form, after they have filled out the form clicking submit will send the mail form and download the file that they have clicked on. What is the best way to go about this? Thanks for any help on this The issue I'm having is that I can't open an html file via a link in an existing web page. My webpage is created in ASP.Net using C# to list out all the .html files in a specific directory. That works fine. Here is the resulting web page Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head><title> </title></head> <body> <form name="form1" method="post" action="ProductsForGraphs.aspx" id="form1"> <div> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTExNzQ0NTIzMDlkZA5WbO/3euQo7nU92sfVjUhzzVQK" /> </div> <div> <table style="width:100%;"> <tr> <td> <a href='c:\FO\graphs\GE_Condor.html' target='_blank'>GE_Condor.html</a> </td> </tr> <tr> <td> <a href='c:\FO\graphs\GE_DblFly.html' target='_blank'>GE_DblFly.html</a> </td> </tr> <tr> <td> <a href='c:\FO\graphs\GE_Fly.html' target='_blank'>GE_Fly.html</a> </td> </tr> <tr> <td> <a href='c:\FO\graphs\I_Condor.html' target='_blank'>I_Condor.html</a> </td> </tr> <tr> <td> <a href='c:\FO\graphs\I_DblFly.html' target='_blank'>I_DblFly.html</a> </td> </tr> <tr> <td> <a href='c:\FO\graphs\I_Fly.html' target='_blank'>I_Fly.html</a> </td> </tr> <tr> <td> <a href='c:\FO\graphs\L_Condor.html' target='_blank'>L_Condor.html</a> </td> </tr> <tr> <td> <a href='c:\FO\graphs\L_DblFly.html' target='_blank'>L_DblFly.html</a> </td> </tr> <tr> <td> <a href='c:\FO\graphs\L_Fly.html' target='_blank'>L_Fly.html</a> </td> </tr> <tr> <td> <a href='c:\FO\graphs\ZQ_Condor.html' target='_blank'>ZQ_Condor.html</a> </td> </tr> <tr> <td> <a href='c:\FO\graphs\ZQ_Fly.html' target='_blank'>ZQ_Fly.html</a> </td> </tr> </table> </div> </form> </body> </html> Now when I click on the GE_Condor.html link, or any other link for that matter. The file doesn't open. Here is the code for the GE_Condor.html file. Code: <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns='http://www.w3.org/1999/xhtml' > <head> <title></title> </head> <body> <p> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE0U0Z0H1M1CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE0Z0H1M1U1CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE1H1M1U1Z1CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE1M1U1Z1H2CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE1U1Z1H2M2CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE1Z1H2M2U2CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE2H2M2U2Z2CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE2M2U2Z2H3CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE2U2Z2H3M3CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE2Z2H3M3U3CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE3H3M3U3Z3CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE3M3U3Z3H4CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE3U3Z3H4M4CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE3Z3H4M4U4CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE4H4M4U4Z4CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE4M4U4Z4H5CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE4U4Z4H5M5CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE4Z4H5M5U5CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE5H5M5U5Z5CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE5M5U5Z5H6CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE5U5Z5H6M6CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE5Z5H6M6U6CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE6H6M6U6Z6CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE6M6U6Z6H7CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE6U6Z6H7M7CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE6Z6H7M7U7CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE7H7M7U7Z7CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE7M7U7Z7H8CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE7U7Z7H8M8CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE7Z7H8M8U8CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE8H8M8U8Z8CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE8M8U8Z8H9CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE8U8Z8H9M9CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE8Z8H9M9U9CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE9H9M9U9Z9CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE9M9U9Z9H0CNDR.png' /> <img alt='No Image' src='C:\FuturesOptions\FOA\FOA\bin\x86\Debug\graphs\GE9U9Z9H0M0CNDR.png' /> </p> </body> </html> If I open the file directly in IE (typing in the path) or double-clicking on the file from windows explorer, it opens without any problems. Any ideas? Thanks Bob Hi, When I open an HTML with my browser to see how it looks, instead of what the code should look like showing showing up, the code itself shows up. Sorry if this is a stupid question, I'm quite new to HTML. I use Dreamweaver CS5. This is the code I used: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html> I have a project written in ASP.NET under Visual Studio 2005 with C#. I am also using Infragistics objects for .NET Advantage 2007. In my page to attach resources to a record I have written a browser and am displaying previously chosen resources here. But when I click the upload button the page opens a new window (which is not a dialog window, but a normal one) which is exactly the same as my dialog window. How can this possibly happen? Can anyone help me? Hi all, I am wondering if anyone know how to have a link, once clicked, open a popup window WHILE also changing the page in the existing window. I know how to code them separately, but I do not know how to combine the two actions. HTML Code: <A HREF="javascript:popUp('popup.html')">link name</A> My site currently uses the above code to open popup windows. Any help would be much appreciated, David |