HTML - Why Do I Return To Top Of Page From Window.showmodaldialog
I have a simple window.showModalDialog code to bring up a dialog box. It works find until I close the dialog box and the initiating page moves to the top. Any ideas how to stop this: The code is below:
<script language="javascript"> function popUp() {var url = "ipcc.php"; window.showModalDialog( url, "Intergovernmental Panel on Climate Change", "resizable:yes; scroll:yes; status:no; dialogLeft:100px; dialogTop:100px; dialogHeight:470px; dialogWidth:640px;");} Thanks. Similar TutorialsHi 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 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 Hello; I am a graphic designer that codes pages quick and dirty entirely with tables. The one I am currently working on needs to be centered in all browser windows at all sizes. I understand that this shouldn't be hard, however everything that I have tried so far hasn't worked. My thoughts are that since it is built entirely in tables (with a java search tool) that I need to make a centered container and place the entire page inside of it. I have tried a few codes I've pulled from other forums with no luck temporary url (and I know the code is dirty) www.showcasepublishing.com/myoutandabout Thanks in advance I have a terrible problem how to make this page resize whatever the resolution of the browser. I've already did liquid layout via percent but the height doesn't do it. They want the content to be scalable in whatever browser dimensions they want. Kindly help me. Thanks. Here is the html: Code: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Porter House New York</title> <link rel="shortcut icon" href="images/favicon.ico" /> <link rel="stylesheet" href="css/main.css" /> <script src="js/jquery.js"></script> <script src="js/drop-down-menu.js"></script> <!--[if IE]> <script src="js/CreateHTML5Elements.js"></script> <![endif]--> <!--[if IE 6]> <script src="js/unitpngfix.js"></script> <![endif]--> </head> <body> <header> <a href="index.html"><img src="images/logo_porter_house_new_york.png" alt="Porter House New York" class="logo" title="Porter House New York" /></a> </header> <!-- end header --> <nav> <ul> <li><a href="#" class="about" title="about">about</a> <ul> <li><a href="#" title="The Restaurant">The Restaurant</a></li> <li><a href="#" title="The Chef">The Chef</a></li> <li><a href="#" title="The Owners">The Owners</a></li> </ul> </li> <li><a href="#" class="menus" title="menus">menus</a></li> <li><a href="#" class="press" title="press">press</a></li> <li><a href="#" class="photos" title="photos">photos</a></li> <li><a href="#" class="private" title="private dining">private dining</a></li> <li><a href="#" class="gift" title="gift certificates">gift certificates</a></li> <li><a href="#" class="contact" title="contact">contact</a></li> <li><a href="#" class="watch" title="contact">contact</a></li> <li><a href="#" class="reserve" title="contact">contact</a></li> </ul> </nav> <!-- end nav --> <div id="content"> <div id="contentTop"> </div> <!-- end contentTop --> <div id="side"></div> <!-- end side --> <div id="main"> </div> <!-- end main --> <div id="contentBottom"> </div> <!-- end contentBottom --> </div> <!-- end content --> <footer> <p>© Copyright 2007. Porter House New York. Powered by 2B-Unique.com</p> </footer> <!-- end footer --> </body> </html> Here is the CSS: Code: /* ---------------------------------------- */ /* CSS RESETS */ /* ---------------------------------------- */ @import url('reset.css'); body { background: #fff url(../images/bg.jpg) repeat-x center 0; background-size: 100% 100%; -o-background-size: 100% 100%; -webkit-background-size: 100% 100%; -khtml-background-size: 100% 100%; -moz-background-size: 100% 100%; } /* ---------------------------------------- */ /* HEADER */ /* ---------------------------------------- */ header { position: relative; margin: 1% auto 0; height: 20%; width: 98%; background: url(../images/header.png) no-repeat 0 0; *background: url(../images/header_ie.gif) no-repeat 0 0; background-size: 100% 100%; -o-background-size: 100% 100%; -webkit-background-size: 100% 100%; -khtml-background-size: 100% 100%; -moz-background-size: 100% 100%; } header img.logo { margin: 3% 0 2% 3%; height: 50%; width: 25%; } /* ---------------------------------------- */ /* NAV */ /* ---------------------------------------- */ nav { position: relative; margin: 0 auto; height: 28px; width: 98%; background: url(../images/nav.png) no-repeat 0 0; *background: url(../images/nav_ie.gif) no-repeat 0 0; background-size: 100% 100%; -o-background-size: 100% 100%; -webkit-background-size: 100% 100%; -khtml-background-size: 100% 100%; -moz-background-size: 100% 100%; } nav ul { margin-left: 1.1%; position: relative; } nav li { position: relative; float: left; } nav a { display: block; text-indent: -9999px; height: 25px; background: url(../images/nav_sprites.png) no-repeat 0 0; } nav a.about { background-position: 0 0; width: 73px; } nav a.about:hover { background-position: 0 -25px; } nav a.menus { background-position: -73px 0; width: 85px; } nav a.menus:hover { background-position: -73px -25px; } nav a.press { background-position: -158px 0; width: 83px; } nav a.press:hover { background-position: -158px -25px; } nav a.photos { background-position: -241px 0; width: 98px; } nav a.photos:hover { background-position: -241px -25px; } nav a.private { background-position: -339px 0; width: 145px; } nav a.private:hover { background-position: -339px -25px; } nav a.gift { background-position: -484px 0; width: 166px; } nav a.gift:hover { background-position: -484px -25px; } nav a.contact { background-position: -650px 0; width: 84px; } nav a.contact:hover { background-position: -650px -25px; } nav a.watch { background-position: -741px 0; width: 252px; } nav a.watch:hover { background-position: -741px -25px; } nav a.reserve { background-position: -993px 0; width: 121px; } nav a.reserve:hover { background-position: -993px -25px; } nav ul ul { position: absolute; left: -10px; top: 25px; z-index: 900; padding: 3px 0; background-color: #ffffeb; } nav ul ul li { float: none; width: 143px; } nav ul ul a { margin: 0 3px; padding-left: 10px; height: 16px; width: 127px; background: none; color: #71462d; font: normal 12px Tahoma; text-indent: 0; text-decoration: none; text-transform: uppercase; } nav ul ul a:hover { background: url(../images/submenu_hover.jpg) no-repeat 0 0; color: #fff; } /* ---------------------------------------- */ /* CONTENT */ /* ---------------------------------------- */ #content { position: relative; margin: 0 auto; overflow: hidden; height: 304px; width: 98%; background: url(../images/content.png) repeat-y 0 0; *background: url(../images/content_ie.gif) repeat-y 0 0; background-size: 100% 100%; -o-background-size: 100% 100%; -webkit-background-size: 100% 100%; -khtml-background-size: 100% 100%; -moz-background-size: 100% 100%; } #contentTop { position: absolute; top: 0; left: 1.05%; z-index: 100; background: url(../images/content_top.png) repeat-x 0 0; *background: none; height: 2%; width: 97.85%; } #contentBottom { position: absolute; bottom: 0; left: 1.05%; z-index: 100; background: url(../images/content_bottom.png) repeat-x 0 0; *background: none; height: 2%; width: 97.75%; } #side { position: relative; float: left; display: inline; margin-left: 1.1%; height: 304px; width: 19.62%; } #main { position: relative; float: right; display: inline; margin-right: 1.1%; min-height: 276px; width: 76.07%; padding: 28px 0 0 12px; } /* ---------------------------------------- */ /* FOOTER */ /* ---------------------------------------- */ footer { position: relative; margin: 0 auto; width: 98%; background: url(../images/footer.png) no-repeat 0 0; *background: url(../images/footer_ie.gif) no-repeat 0 0; background-size: 100% 100%; -o-background-size: 100% 100%; -webkit-background-size: 100% 100%; -khtml-background-size: 100% 100%; -moz-background-size: 100% 100%; } footer p { margin: 20px 0 0 11px; display: inline-block; text-indent: -9999px; height: 50%; width: 40%; background: url(../images/copyright.png) no-repeat 0 0; background-size: 100% 100%; -o-background-size: 100% 100%; -webkit-background-size: 100% 100%; -khtml-background-size: 100% 100%; -moz-background-size: 100% 100%; } Hi im aware how to fit the width of a page so it fills the browser window but im curious on how to set the height of the page? the width works perfectly and just the height im stuck with hai, could anyone plz tell me, how to open window popup in current html page ( that means not in different window) without statusbar,locationbar,titlebar and menubar and scrollbar. Thanks®ards kelvin Hello I'm new to HTML Now straight to the point : I have a web page that looks too big when screen resolution is 1024x786 , but on the other pc (screen resolution 1280x1024 ) the same page looks too small and I have white spaces around it. I want my whole page with it's elements adapt to the browser window size and fit exactly to it ( I don't want to see that scrolling thing on the right or bottom ). You could just give me the link of the function/code I have to use. Here is my code if that helps. Code: <html> <title>AiiT</title> <body background="b.png" style="background-repeat:no-repeat; background-position:center center; width: 1024px;height:768px;"> <div style="background-image: url('1.png'); width:764px; height:557px; position: absolute; top: 12%; left: 50%; margin-left: -382px; text-align:center; "><div style="background-image: url('Tr.png'); background-repeat:no-repeat; position: relative; left:30px; top:30px;"><img src="Her.png" border="0" style="margin-top:10px;"><br><br> <a href="en/"><img src="an.png" border="0"></a> <a href="lt/"><img src="li.png" border="0"></a><br><br><img src="Logo.png" border=0"></div></div> </body> </html> Help appreciated. Hi, I have a table in which some entries open a new window with the required information. when a new window is opened, my parent page scrolls to the top, and again I have to search for the row where I had been previously, What property should I set as to avoid this? Please reply.. hello, I'm an HTML novice who designed/maintains my own site without any expertise at all. One problem I can't seem to figure out: When the browser window is sized more narrowly than the content on the page, the table sections get shoved down underneath one another. Most sites I see don't do that -- when the browser window narrows, the site content stays in place. Any insight about what my error is? You can check out the problem at www.adamgwon.com. Thanks much. Greetings, Thanks in advance for any help. Basically, I'm new to HTML, I've made a site with an external CSS file, its all good, except that all the elements stay to the left. The browser background is grey, the actual page background is white (its an image, however, not just the colour). The page adjusts when I resize the IE window, but nothing else does, they just stay there. I've tried absolute positioning, relative, and so on, but nothing seems to fix it. How do I get the elements to move? I've attached the CSS and index file (named portfolio) for reference. I apologise in advance for my general noobiness. I hope the poorly written attachments don't hinder the helping process. Thank you, Panda. My page contains several iframes and each contains a form. In IE (but not in FF), when I submit a form, the action page is shown in a new window. How can I make it so the action page is instead loaded inside the iframe? 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? In mininova.org, when we scroll down the page, ad on the right side is automatically adjusted. How to do achieve this using html? I want to implement the same in my site? 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 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 All: I'm making a online configurator so that users can customize the product. the question is : After people finish customization, can they save their choice so that when they come back, they can see their choice directly. Hello, I am trying to create a blog page on my website and after every blog entry I would like to include a top link, that would send the user to the top of the page, where the latest blog entry is located. Dear friends, I have a situation (may be silly but needed) as below When clicking 1.html should open http://myurl/2.html and return to 1.html again. I can do anything on 1.html but not on 2.html any advice? if html is not possible aspx pls? Thanks Bala Hi there, what should I do to get validated the following error? I have to validate it with XHTML 1.0 Strict. Please someone help me, thanks so much. Code: Line 39, Column 32: character "&" is the first character of a delimiter but occurred as data . onsubmit="return validateForm() & & validateMessage();"> This message may appear in several cases: * You tried to include the "<" character in your page: you should escape it as "<" * You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&", which is always safe. * Another possibility is that you forgot to close quotes in a previous tag. Currently im wishing to be able to have a text form box that i cna write in and it goes somewhere(a database maybe?) and checks if its the correct ansewer, if it is, it goes to the new URL if its wrong it comes up with an error messege and then goes back to the previous page. How do i do this? Or at least START doing this? |