HTML - Close Window
I 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? Similar TutorialsHi 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 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()"">" I need html code of an ad with close button and I also need html code of floating ad with close button.If someone knows how to do it , please post html. 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? http://lmiinc.com/LMIinc_Links.html First off let me say sorry for the code on here, its terrible, but not mine, I'm just trying to help do a little updating while I'm building him a new site. Ok I edited a bunch on this page & now its still a really long page with just a little info & there is a large blank gap until you reach the bottom. I've tried resizing a few things to make it normal with no luck. What do I need to adjust to make it normal? I am so close to finishing up the pop player that I have been working on. Need just a little help to get over the top http://www.vlifechurch.org/ on this page is a sermon player link. If you click on it you will see the player, for some reason I can not get the video player moved over to the right and let the weekly sermons titles on the right. Please a little help... thanksss there are sum pages where theres a lil link u click on to close the page how to do this ??? and if i want it to be automatically done after a period of time i want it to be sumthin like this for example HTML Code: <script type="text/javascript"> function redirect() { document.location.href = "http://www.westcoast-host.com/en"; } setTimeout("redirect()", 10000); </script> this is for redirect i want to close the page Thanx BYE When you use a <p> tag, there is space between paragraphs. Not sure if there is are automatic margins set for the top and bottom, but that's the way it seems. I'm using <p> tags inside a <table> and I'd like the first paragraph to be tight to the top of the cell but the only way I know how to do it is to remove the <p> tags from the first paragraph. I don't really want to do this as I'd like to have the <p> tags around each paragraph. Here is what I have, which btw does exactly what I want it to but as you can see the first set of <p> tags have been removed. What's a better way to get this effect? Code: <table cellspacing="10"> <tr> <td class="menu" style="background-color:#8C9429"><a href="lab4-2bsolution.html">Prices</a> <p><a href="http://www.antiquity.ac.uk/">Links</a></p></td> <td class="content">Voytokovich Antiquities is the leadinng wholesaler for Asian, Middle Eastern, and European antiquities. Items in our store include masks from a variety of cultures, statues, paintings, and other collectibles. Bring the past into your own homes with the beautiful art pieces offered in our store. Come visit us often to find new and unusual items not found elsewhere <p>The links on the left take you to pricing information and our favorite Web sites. Please take a look at our prices and call or e-mail us for a price quote.</p> <p>Please sent any comments to <a href="mailto:voytkovich@isp.com">voytkovich@isp.com</a>.</p></td> </tr> </table> This is for a class assignment. It calls for a one row, two column borderless table. The first column has two links (one on top of the other), and the second column has three paragraphs of text. Thanks for any suggestions! Ok I just deleted about 100 links off of this page: http://lmiinc.com/LMIinc_Links.html And now as you can see there is some extra space. What do I have to do in order to make it look "normal"? Thanks. Hi, I'm working on a project and I want layers stacked to be visible and invisible through a button. Anyone here that buys books on Amazon knows what I'm talking about. Some books in Amazon have a "look inside" that when you click it opens like a layer where you can see some content of the book. This layer or whatever it is has an X button to close it. This is what I want to do, but I don't have an idea of how this can be accomplished. Any help will be appreciated. Thanks Overview User will visit the site, that has a default iframe on load that displays in on the page. The below div i'm using to null their ability to navigate the base page *excluding the iframe Code: <div id="popupMask0" class="popupMask" style="z-index: 2001; display: block; height: 600px; width: 100%; top: 0px; left: 0px;"> </div> So the user is looking at a page that has a user agreement in the iframe. if they click "NO", they are re-directed to a page that says they cannot view the site due to not agreeing to the terms page. If they click "YES", they are taken to a terms of use page, also contained in the iframe with the masked div over the main page. Once on the terms page, if they click "NO", they are re-directed to a page that says they cannot view the site due to not agreeing to the 2nd terms page. If they click "YES", the iframe disapears and the masked DIV disapears. The user will have the ability to click links and objects on the base page at this time. Goal Need to have a user agreement page, and term page display before allowing users to login to a site. This is the cleanest way that i can think of for the restrictions i need to work around. All viewers will be using IE, so no need to be cross-browser friendly. screen shots attached If a person needs to close their site temporarily for health reasons, what would be the best approach for that? This site is using html pages as well as an ecommerce store. The site will be returning as it is, but we dont want anyone to be able to make purchases or view the content of the site for the time being. Any suggestions/help will be greatly appreciated. Thank you! Hi all, In my report i show the amount value. Below the amount value, i want to draw 2 horizontal lines close to each other in HTML. I used 2 hr tags and it printed 2 horizontal lines but the width between them is large. I want the 2 horizontal lines to be very close to each other. e.g Amount: 100 -------- -------- The above 2 lines should be closer to each other and not like the above. Let me know if anyone knows how this can be done. The text on this page has huge gaps between the lines. The gaps are between "Choose a Transaction", "Transaction Types" and the button "Next". I have included the page code and attached an image for reference. If you could help me close the gaps, I'd greatly appreciate it. Thanks. Code: <table width='770' border='0' cellpadding='0' cellspacing='0' id='maintable' align='center' valign='top' align='left' margin=0 padding=0 width='770' height='500' table style='background-color:#ffffff; font-family:Arial, Helvetica, sans-serif; width:'770' height:'500'></td> <link href='custom.css' rel='stylesheet' type='text/css'> <td id='menu' align='left' valign='top' rowspan='500' width='164'> <br> <img src='images/bullet.gif' alt='' width='10' height='10'><a href='index.php'><font color='#DDCEA2'><font face='Arial' size='2'>Home</a></font><br></a> <form method="POST" action="index.php"> <input class='field' type='hidden' name='command' value='account'> <input class='field' type='hidden' name='param' value='renew'> <input class='field' type='hidden' name='account_id' value='[account_id]'> <td colspan='2' class='pageTitle'><div class='hLine'><font face="Arial" color="#EE7600" size="3"> Choose a Transaction</font></div></td> <tr><td class='fieldLabel' width="30%"><font face="Arial" color=#000000" size="3" Style="padding: 5px;"> <font face="Arial" color="#000000" size="3"> Transaction Type:</font><!--</td>--> <td align="left"><font face="Arial" color="#EE7600" size="2">[account_type_panel]</font></td> <tr><td align="center"></td> <td align="left"><input name="submit" type='submit' class='button' value='Next' /></td> </tr> </form> <tr height='30%' ><div class='hLine'></div></td></tr> </table> |