HTML - Redirect Depending On Resolution
I wrote a code that I am assuming you guys should know exactly what I want my web page to do, however I can guarentee there are flaws in it since this is my first xhtml script ive written. I do know basic programming language making this code easier to read and uenderstand. So please review my code get an idea of what I am trying to do and help me write it to get it to work.
\\common resolutions: 800x600, 1024x768, 1240x800 $resolution = "screen.width'x'screen.height"; \\This should detect the resolution correct? If switch ($resolution){ case "800x600": onLoad="ScreenGoToURL('Index1.php')"> \\I am assuming this will redirect to Index1.php if the resolution is 800x600 break; case "1024x768": onLoad="ScreenGoToURL('Index2.php')"> \\redirects to index2.php if 1024x768 break; case "1240x800": onLoad="ScreenGoToURL('Index3.php')"> \\redirects to index3.php if 1240x800 break; case "320x480": onLoad="ScreenGoToURL('Index4.php')"> \\redirects to iTouch page break; } else { onLoad"ScreenGoToURL('Index.php')'> \\This will redirect them to a uknown screen size? Thanks in advance Similar TutorialsHi, I want my website to redirect depending on the last URL so if the last website was http://Abc.com/a it would redirect to http://google.co.uk but if the last URL was diffrent it would redict to anouther URL. Thanks. Hi. I'm just wondering what standart screen resolution i stheese days? Doen anybody still use 800x600, or is it alright to build a website for 1024x768? If so, is there any "design resolution" to prevent scrollbars in the most usen browsers? (What i mean is what resolution to give for example a flash site) Parashurama Well, my website is almost complete now, but its still not "wide" enough to extend all the way to the scroll bar on IE. Can anyone explain if there is an HTML code for this? or how to fix this on Dreamweaver? Friends I am new to HTML, I have created a page, but when I view it on 00*600 it looks fine as I designed. But When resolution is increased, it shows right side empty. What should I do ????????? Hi, I created a simple test webpage and publish it online. But when I used my friend's PC with his 19 inch screen, my webpage looked different from when I created it. I heard that it because of the resolution. I need help on how I can make my webpage compatible with all kinds resolutions. Please help as I am a newbie in creating webpage. Thank you so much. Hello everyone... I'm building a website http://newgroundsaward.webs.com/index.html The problem is that... when ever you minimize the window... the tables shrink. It can only be viewed in 1400x900 resolution. Is there a way to lock the aspect or something. Here's the link to my style sheet... Any help appreciated. Thank You. http://newgroundsaward.webs.com/styles.css So, my friends and I are making a gaming clan website, arabsofagrabah.com (Visit it if you want) and we're trying to make it in a way where the middle box is the only thing scrollable. We're having trouble making the frames fit right and also make it so the design stretches to fit all resolutions (obviously made for 1024, but I use 1152), so how can I do those 2 things? Remember... 1) Make the frames correctly fit where the main box is only content and scrollable 2) Stretch for all resolutions without making everyone clicking on a different resolution in the beginning of the site (splash, we'll make one) Remember, we're using dreamweaver MX here I want my webpage to fit any resolution, and I am doing something wrong, could you help me with the right coding? thank you Hi, I am working on some JSP pages . My Desktop system has 1440*900 resolution. The output generated in this resolution is perfect. But when i switch to 1280*600 or 800*600 it gives me floated output . Why it so? Is there any solution? I am also using css file to render output Hi, When viewed in IE6 (800 x 600), some of my images shift down the web page with blank space above it. The images seem to start at bottom of the left side bar. Firefox displays the images correct. Could anyone help me with this problem? Thanks, Larry Alright I am new to this and I just finshed a fairly elaborate site for a buddy of mine. However, I didn't realise I was setting the whole site up under my screen resolution which is 1680x1050. Is there any way to make the site automatically adapt to different screen resolutions without me having to change every page I made. Please Help !!! Aloha! I have created my site with a resolution of 1280 x 800. Now I understand a bit more about resolution. In order to create my site with a lower resolution, do I merely change my computer's resolution by going to the control panel, and then composing my entire site again? What is the best resolution in which to create it? I also have a question about encoding. When one save's the html. document, how does one know which of the options in which to save it? Thank you for your help. I had a graphics designer create an image for a background web page. The dimensions are 950x2000 at 72 DPI. I used the table tag with the background attribute and set the table width to 950, but when I veiw it in the browser, the image is substationally magnified. I tried it in IE 7, IE8, Firefox and Safari, and at different screen resolutions, but it still comes up magnified. If anyone knows what is happening, please let me know. Thanks Hi there! If this topic has already been covered or there is a tutorial out there that someone knows about, please point me in the right direction. We've created a website on a CD. Pretty much a company profile. The "site" is split into two framesets. The logo of the company is in the top frame while the content is obviously in the main frame. It's perfectly spaced on a 1024x768 resolution. The problem is that if you change it to 1280x1024, there is a gap between the company logo and the content. This looks stupid. Is there a way that we can get the frames to "auto adjust" so that the logo remains intact and the content pretty much remains "attached" to the logo? One of the problems we have encountered is that the frame "overlaps" the logo, so the logo is cut in half. We're at wits end. The source we have for the index file is: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <HTML> <HEAD><TITLE>Intelligent Frames</TITLE> </HEAD> <FRAMESET ROWS="22%, 100%"> <FRAME SRC="top frame.html" NAME="menuframe" scrolling="no" frameborder="0" noresize> <FRAME SRC="main frame.html" NAME="mainframe" scrolling="auto" frameborder="0" noresize> </FRAMESET> <NOFRAMES> There is no frame support on your browser. </NOFRAMES> </HTML> I have also just noticed that even in 1024x768, if I make the browser window smaller, the frame still overlaps the logo. This made me wonder if I shouldn't perhaps be looking at creating "static" or "frozen" frames that can't adjust itself regardless of resolution. Is this perhaps a better way of approaching this problem? Thanks in advance! I May I know how can make sure that my website fit under any resolution with out using Table(table,tr,td) in html??? Basically I have recently added more to my "Navigation Bar" it works fine on a "1366 x 768" that is currently my screen settings. Yet i looked on a 1024 x 768 and it was all over the place. Here is screenshots of what I mean. This is what it looks like on the 1024x768 screen. This is how I want it to look on all screens. So im basically saying what settings to I have to apply to make this a fix on all screens. Cheers. Hello everyone! I just finished making a website and found some browser problems, which I sort of fixed. Now I found some problems with the different resolutions. Does anyone know some tips or suggestions that can help me fix that? (p.s My website is at webh3lp.comuf.com) If I'm using basic html/css stuff and tables, how do I get it so my graphics and everything on my site scales properly to the viewers screen resolution? Any tutorials on this? thanks! Hello, I'd like to know if there's a way to 'force' a website to be viewed in a certain resolution. My site was designed for 1024x768 at home. Externally the office computers I tested it on are set to 1280x1024, and the site looks far too small. Is there html or script that would auto size it to 1024x768 without the user changing monitor resolution? Here's the code: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="language" content="english"> <meta http-equiv="Content-Style-Type" content="text/css"> <title>www.testing.com</title> <style type="text/css"> html,body { height:100%; margin:0; background-color:#000; } #vertical { float:left; width:100%; height:50%; margin-top:-329px; } #container { clear:both; width:933px; height:658px; margin:auto; } #container img { display:block; width:933px; height:658px; border:0; } </style> </head> <body> <div id="vertical"></div> <div id="container"> <img src="comet3.jpg" width="933" usemap="#map" alt="comet3"> <map name="map" id="map"> <area shape="circle" coords="885,123,9" href="comet2.html" alt=""> <area shape="circle" coords="916,124,9" href="comet4.html" alt=""> <area shape="rect" coords="785,71,904,103" href="contact.html" alt=""> <area shape="rect" coords="665,70,756,109" href="about.html" alt=""> <area shape="rect" coords="371,73,462,112" href="index.html" alt=""> <area shape="rect" coords="499,70,632,111" href="portfolio.html" alt=""> <area shape="poly" coords="891,118" href="#" alt=""> </map> </div> </body> </html> Thanks to anyone who can help with this! Cheers J I created a layout in photoshop that was in 1024x768 res and then I put it into Dreamweaver and got the layout aligned but when I insert text it stays where I want it but then when I change my res the text moves. I used "Draw Ap Div" in Dreamweaver to create the text over the image sliced layout. Is there any way of keeping it where I want it at every res? |