Andy-H Posted July 29, 2008 Share Posted July 29, 2008 I am making a text based game and have been advised(in HTML help) not to use frames, I have only ever made a website with frames before and was wondering how to go about this. I already know I will have a header file with the banner and menu then program the main page before requiring a footer. Is the best way to go about this to make a page-sized table dividing the page into banner, menu, main page and footer between the require files or does anyone know of a better/more efficient way? Thank you for any replies. Quote Link to comment https://forums.phpfreaks.com/topic/117243-solved-how-do-i-go-about-making-a-site-without-frames/ Share on other sites More sharing options...
DarkWater Posted July 31, 2008 Share Posted July 31, 2008 CSS. It's the way to go these days. It just takes a lot of practice. Quote Link to comment https://forums.phpfreaks.com/topic/117243-solved-how-do-i-go-about-making-a-site-without-frames/#findComment-604156 Share on other sites More sharing options...
tibberous Posted July 31, 2008 Share Posted July 31, 2008 LOL - I almost forgot about non-iframes. Some people like to break it into header, footer and menu - I like to make a central index page and load in the content based on the request url. My way I can make 100% sure the auth gets called, %100 sure the files are protected from direct access, and I never have to use header('location:'); Quote Link to comment https://forums.phpfreaks.com/topic/117243-solved-how-do-i-go-about-making-a-site-without-frames/#findComment-604234 Share on other sites More sharing options...
Andy-H Posted July 31, 2008 Author Share Posted July 31, 2008 By that do you mean make the basic page layout in tables, then have a central index like: <?php $page = htmlspecialchars($_GET['page']); if ($page == "Online"){ require("online.php"); }elseif ($page == "Kill"){ require("kill.php"); }etc{ } ?> ??? Quote Link to comment https://forums.phpfreaks.com/topic/117243-solved-how-do-i-go-about-making-a-site-without-frames/#findComment-604974 Share on other sites More sharing options...
obsidian Posted July 31, 2008 Share Posted July 31, 2008 Since you are talking about making a game and needing to simulate the effect of frames by an action taken in one area sending an action to the server and requesting a response, you will want to look at making your game use AJAX for the updates. It really sounds more complex than it is, but you need to come up with your basic CSS layout and define a structure of where your responses will be updated. You will need a fairly solid understanding of JavaScript and a concept of HTTP requests to get a good handle on this technique. Quote Link to comment https://forums.phpfreaks.com/topic/117243-solved-how-do-i-go-about-making-a-site-without-frames/#findComment-604984 Share on other sites More sharing options...
Andy-H Posted July 31, 2008 Author Share Posted July 31, 2008 Thanks for the advice, obsidian loving the avatar but FFVII and FFX rule, VIII and IX are top games too Quote Link to comment https://forums.phpfreaks.com/topic/117243-solved-how-do-i-go-about-making-a-site-without-frames/#findComment-605026 Share on other sites More sharing options...
Andy-H Posted July 31, 2008 Author Share Posted July 31, 2008 Also, I have VERY little knowledge of JavaScript and no knowledge of HTTP REQUESTS/AJAX :S Quote Link to comment https://forums.phpfreaks.com/topic/117243-solved-how-do-i-go-about-making-a-site-without-frames/#findComment-605049 Share on other sites More sharing options...
tibberous Posted July 31, 2008 Share Posted July 31, 2008 Yeah - just like that. Quote Link to comment https://forums.phpfreaks.com/topic/117243-solved-how-do-i-go-about-making-a-site-without-frames/#findComment-605111 Share on other sites More sharing options...
Andy-H Posted August 1, 2008 Author Share Posted August 1, 2008 thanks Quote Link to comment https://forums.phpfreaks.com/topic/117243-solved-how-do-i-go-about-making-a-site-without-frames/#findComment-605138 Share on other sites More sharing options...
obsidian Posted August 1, 2008 Share Posted August 1, 2008 Also, a side note is that, when possible, you really should stay away from tables for the actual layout of the page and save them for when you're displaying tabular data or the like... Quote Link to comment https://forums.phpfreaks.com/topic/117243-solved-how-do-i-go-about-making-a-site-without-frames/#findComment-605479 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.