HTML - How To Close Specified Window (not Parent Window))
Hi all,
I have two html file (first.html and second.html) i called the first.html from batch Command file, then the batch file calls the second.html file. what i want is that while loading the second.html it will close the first.html using script. If its a parent then i can use top.close() or parent.close() but its not a parent window. Here no parent file. please help me to do this. Thanks Jay Similar TutorialsI try to make make "close window" button or link and I used this codes: Code: <form> <input type="button" value="Close Window" onClick="window.close()"> </form> or this one Code: <a href="javascript:window.close()">Close Window</a> None of this one works in firefox. Do I have to do some modification to the code? Does someone have other code I can use? I remember some 6 years back when I used to play around with HTML that there was a code that I could use. What it did was when you closed out the webpage it would cause another webpage to load in it's place. much like what a lot of porn sites do for traffic. Any information would be appreciated. "Lifes a ***** than you go to hell" I have the following html which opens a new window. Is there a way of once the new window has opened, the current window closes? thanks HTML Code: <html> <head> <a href="http://www.capitasymonds.co.uk/expertise/all_expertise/industrial_design__project_se.aspx" target="_blank"> <img src="CS_LOGO.jpg" alt="capita logo" width="304" height="30" border="0"/> </a> <head> <hr> <title> Multi-Pix Created By CAPITA SYMONDS </title> <body <br><p><em><b><font size= +1 >Multi-Pix Secure Area Demo:</font></b></em></p> <p><em><a href="#" onClick="javascript:window.open('Multipix.html','_blank','status=yes,top=0,left=0,width=1024,height=768');" >click here</a> to view the Multi-Pix.</em></p> <hr> Generated by <a href="http://www.capitasymonds.co.uk/expertise/all_expertise/process_engineering/smart_tools.aspx" target="_blank"> <br><img src="ST_LOGO.jpg" alt="capita logo" width="200" height="30" border="0"/> </a> </body> </html> I am new to HTML coding. I am trying to create a form, which, automatically submits the form contents and finally automatically close the browser window. But I am not able to get the self form submissions and self window closing. The code that I have written is found below. Kindly advice on how to get it working. Thanks in advance. <html> <body> </form> <p><b>This form submits an HTTP POST request to url '/forms_example/post'</b></p> <form name="form1" form method="POST" action="http://localhost/forms_example/post"> <table> <tr> </tr><tr><td>Name</td><td><input type="Text" name="name" VALUE="roger"></td></tr> <tr><td>Address</td><td><input type="Text" name="address" VALUE="smith"></td></tr> <tr><td>Phone</td><td><input type="Text" name="phone" VALUE="25714988"></td></tr> <tr><td>E-Mail</td><td><input type="Text" name="email" VALUE="roger.smithatgmail.com"></td></tr> <tr><td><input type="Submit" VALUE="submit" > </td></tr> </table> </form> </script> function GO(){ setTimeout("subForm()",0) } function subForm(){ document.form1.submit() } t = null; function closeMe(){ t = setTimeout("self.close()",2000); } </script> </body onload="GO()";"closeMe()"> </html> Who can answer me the question above? Thanks in advance! "Use the below code example. <input type=""button"" value=""Close this window"" onclick=""self.close()"">" ok.. well.. im making a control panel.. that updates the parent window... this is the code in the parent window to pop up the child: <img src="g2cpanel.jpg" onClick="window.open ('cpanel.html', 'newWin', 'width=255, height=255')"> and this is the whole page of my child window: <html> <head> <title>boyo productions::control panel</title> <style type="text/css"> body {background-color: black; text-color: yellow; } .maintitle {background-color: yellow; text-align: center; }</style> <script language="JavaScript"> function updateParent(newURL){ opener.document.location = new URL } </script> </head> <body><center> <img src="cpanel.jpg"><br> <div class="maintitle">welcome to the control panel!</div> <a href="javascript: updateParent('index.html')">**home**</a><br><br> <a href="javascript: updateParent('codes.html')">**get the codes!**</a><br><br> <a href="javascript: updateParent('forum.html')">**forum(coming soon)**</a><br><br> <div class="maintitle">© boyo productions 2007-2008</div> </body> </html> my problem is that i can get the control panel to pop up once the image is clicked on, but, in that child window of a control panel, the links wont update the parent window.. whats wrong with my code? plz help me.. ty all Currently, I have a link that pops up. My issue is that within that popup, I have a link that I want to: - target the parent window - close on click I can get the link to either target the parent window or close on click, but I can't get it to do both. Help? Hi Everyone, Please refer to attached test.zip. Open a.htm, tested under IE, Safari, Firefox no problem, but ONLY google chrome fail, seems cannot use call parent javascript function under the child iframe. Please advice. Thanks 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 Here is the case. I have an HTML page that opens a pop-up. Within the popup I need upon click to open a new window. The code is as it should be according to all references: <a href="some url" target="_blank">text</a> Everything is ok with IE6 and IE7 - a new window is being opened. What happens in Firefox is very strange - tabs are shown and the currently opened popup becomes one of the tabs and the new window opens in a new tab of the pop-up window instead in a new normal window. Did anybody encounter the same problem? Any solutions? I have constructed an html window within a window thusly: <object type="text/html" data="x/FE-000-EN.html" style="width:460px; height:800px; margin-left:20px;" width="24" height="24"></object> on the same page outside of that window I would like to place buttons which change the content of the window within a window. I use a basic hyperlink button, to click this link below and change the content of the window above I...? <a href="001.htm">001</a><font color="#FFFFFF">: S.S.H.U.T.</font><br> Thanks for your assistance =) You may view the complete site here if needed: http://fragmentearth.netfirms.com/ Hi, I have a java script function like this to open one child window form main window. Its working properly. function billingMain() { top.consoleRef=window.open('#{facesContext.externa lContext.requestContextPath}/main/billing/billingMain.jsf','window1', 'width=950,height=400' +',menubar=0' +',toolbar=0' +',status=0' +',scrollbars=1' +',resizable=0' +',location=0') top.consoleRef.document.close() } But when my child window opened, i want to open another child window from previous child window. and here is the script follows for this, function UB92Main() { top.consoleRef=window.open('#{facesContext.externa lContext.requestContextPath}/main/billing/claimInformation.jsf','UB92', 'width=450,height=250' +',menubar=0' +',toolbar=0' +',status=0' +',scrollbars=1' +',resizable=0' +',location=0') top.consoleRef.document.close() } here the second child window is not opening. How to resolve this. Thanks, Vinutha. There is this website and she shows her art in a thumbnail and then when you click on it, it gives a description of the images along with the image in a pop up window. Does anyone have the code to do this? here is a link to one of them: http://glowstickdog.com/images/portfolio/im_you.php Hey i need a bit of help, how do i have a thumbnail link to a new page and have it pop up smaller then the original window? hi there, does anyone know if you can open a new window in an already opened window? i need this to be done on my website, a script would be superb as i can't seem to find any online! many thanks Hey! This is my first post here btw. I want to ask silly thing: I need to make a simple POP UP window as link from an image. Can any1 explain me this thing, using easy words, please don't give me links to other websites, I've been everywhere cheers, ne3ga Hello, and thank you for granting me access to such a wonderfull Forum. Well here goes .... I have a code snippet which happens to be an affiliate banner. Once inserted into the web site code it is effective however: when clicked from a viewers perspective it engages as a 'pop-up' opposed to a new window (which is what i need). I am not yet wise in the ways of html yet but have just chosen 'blank' in DW to set that on other objects. This does not give me that option though - Im sure its just a matter of inserting target="_blank" somewhere, but I cannot figure out where. Can someone please tell me how to fiddle with this code to make it open in a new window instead of a pop-up? : <div class="style33" id="idALTxCOMxxJOINxFORxFREExx" style="position:absolute; top:2095px; left:140px; width:728px; height:90px; z-index: 0;"> <object name="cm728doschicas" id="cm728doschicas" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="728" height="90"> <param name="allowscriptaccess" value="always" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="wmode" value="transparent" /> <param name="movie" value=http://banners.alt.com/banners/alt/27066/cm728doschicas.swf?go_url=http://alt.com/go/g1003239-ppc /><param name="quality" value="high" /> <embed name="15671_27066_175x131_01" src=http://banners.alt.com/banners/alt/27066/cm728doschicas.swf?go_url=http://alt.com/go/g1003239-ppc quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="728" height="90"></embed> </object> <script language="javascript"> document.cm728doschicas.SetVariable('go_url', 'http://alt.com/go/g1003239-ppc'); </script> </div> Thank you so much How do you create a link for a new window to pop up, and have it be smaller then the original window? I have the window, i just need a link to make it pop up in a smaller size. Thanks Hello - 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 |