Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17
  1. #1
    Junior Member
    Join Date
    Sep 2007
    Location
    South Africa
    Posts
    14
    Member #
    15813
    Hi all,

    My webpage I designed for my rugby club at www.unionrugby.co.za is just the way we like it, not too flashy and just the basics.

    I have one question though. If you look at the site, my default home page never changes, only the middle inline frame which is my content area changes according to the links the visitor decides to visit (depending on the dimensions of the webpage otherwise it opens in a new window).

    now the problem I have is that HTML never dynamically refreshes so when I do updates the visitors dont always see it because of the caching the browsers do. Now I have done the "<META HTTP-EQUIV="expires" CONTENT="Mon, 03 Sep 2007 00:00:00 GMT">" thing on every page but it only works for the home page and not for any of the pages that are displayed in my inline frame.

    any suggestions on how to solve this one?

    thanks

  2.  

  3. #2
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    I wouldn't use inline frames, but would rather use includes on the server... your layout makes this very easy to do...

    Assuming you have access to php, the simplest way you could do that would be thus... where your inline frame currently is, put the following code (or similar)...

    Code:
    <?php
               /* get page option from substitution variables */
    
               $page = $_GET['page'];
               
               /* if no page entered index */
    
               if ( ! $page ) $page = "Results";
    
               /* make up filename */
    
               $filename = $page . ".inc";
    
               /* include file */
    
               if ( file_exists($filename) )  
                         include($filename);
               else
                         include("notfound.inc");
    ?>
    You then need to create an extra "not exists" page... and rename the sub-pages from .htm to .inc, removing all the bits above and below the <body> section...

    Hyperlinks are then modified such... Golden Oldies can stay "as is"...

    Code:
    			<a href="index.php?page=club_rugby_logs">
    			     <img border="0" src="images/buttons/home_button.gif" width="100" height="20" />
                            </a>
    			<a href="index.php?page=news_0001">
    			     <img border="0" src="images/buttons/news_button.gif" width="100" height="20" />
                            </a>
    			<a href="index.php?page=Results">
    			     <img border="0" src="images/buttons/results_button.gif" width="100" height="20" />
                            </a>
    			<a href="index.php?page=fixtures_2007">
    			     <img border="0" src="images/buttons/fixtures_button.gif" width="100" height="20" />
                            </a>
    			<a href="index.php?page=profile_home">
    			     <img border="0" src="images/buttons/profiles_button.gif" width="100" height="20" />
                            </a>
    			<a href="index.php?page=galleries_001">
    			     <img border="0" src="images/buttons/gallery_button.gif" width="100" height="20" />
                            </a>
    			<a href="index.php?page=contact_details">
    			     <img border="0" src="images/buttons/contacts_button.gif" width="100" height="20" />
                            </a>
    			<a target="_blank" href="Golden_Oldies/oldies.htm">
    			     <img border="0" src="images/buttons/oldies_button.gif" width="100" height="20" />
                            </a>
    I'm not an ASP programmer so if you don't have access to php you'll have to tweak the concept to use ASP's include functionality, but the concept/structure will be the same.

    Sean

  4. #3
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    Here's my suggestion in action... also had to put a div around the code above to get your grey border and include the stylesheet in the main index.php file...

    http://www.seanmiller.net/bits/rugby

    I've only done the first three links, but you should see it looks pretty much identical to your original, except now the page is actually being loaded... this will also have benefits in terms of bookmarking as if people bookmark a specific page they will go straight to it when returning, rather than the Results page as at present.

    Sean

  5. #4
    Junior Member
    Join Date
    Sep 2007
    Location
    South Africa
    Posts
    14
    Member #
    15813
    Sean, thanks for the reply.

    Unfortunately my hosting provider does not have PHP support but does ASP. I will wait for some ASP guru's to reply also.

    thanks again.

  6. #5
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    As I said I am not an ASP programmer, but I think it's something like this that you need to replace the php with...

    EDIT: Code removed... see full HTML source below...

    Hope that helps,

    Sean

  7. #6
    Junior Member
    Join Date
    Sep 2007
    Location
    South Africa
    Posts
    14
    Member #
    15813
    Kewl thanks Sean,

    And WOW I forgot to look at the link, you did that in a few seconds!? amazing!

    Would that site be too primitive for CSS, I am trying to get my head around CSS at the moment and I suppose anything is difficult the first time.

    how would I reference the content area of my site if I were to make it a <div>. for instance when you create a hyperlink in HTML you tell it which "frame" you want it to display in (_target). how do you do this with <div> or a table?

    please help.

  8. #7
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    The ASP isn't right... just playing with it...

    You wouldn't really reference the content area, it's the other way around... if you look at the code you'll see that it includes the file in the content area when parsing the page... the fact that the php/ASP are actually in the div is how it knows to put it there...

    Sean

  9. #8
    Junior Member
    Join Date
    Sep 2007
    Location
    South Africa
    Posts
    14
    Member #
    15813
    I sort of understand.

    But if I talk specifically about CSS and HTML, if I create a class and its values called .content in my style sheet, and I assign that class to a <div> tag in place of my iframe (i want the iframe out), how do I tell the buttons' hyperlink to display in the source link in the content div and maintain its proportions.

    so 3 things if you dont mind:
    1. How to replace the iframe with a div tag for my content?
    2.Should I rather be creating an ID rather than just a class (content)?
    3.How do you keep the content body in proportion like it is within an iframe?

    I tried something similar on a new page earlier but the text did not format itself to stay in the content box, it continued to go across the page in a single line to infinity.

    thanks for your patience sean, much appreciated.

  10. #9
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    Just trying to figure out this ASP at present... will be back in a while...

    Sean

  11. #10
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    Here you go, here's some ASP code for you...

    Code:
    <html>
    <head>
            <title>ASP TEST</title>
            <style>
                    body {
                            font-family: Verdana, Arial, sans-serif;
                            font-size: 12px;
                    }
                    #nav {
                            margin-top: 100px;
                            text-align: center;
                    }      
                    #nav a {
                            text-decoration: none;
                            color: red;
                            padding: 10px;
                    }
                    #nav a:hover {
                            text-decoration: underline;
                    }
                    #content {
                            height: 200px;
                            width: 500px;
                            overflow: auto;
                            background-color: #CCCCCC;
                            border: 1px solid #000000;
                            margin: 0 auto;
                            padding: 10px;
                    }
            </style>
    </head>           <p id="nav">
                    <a href="default.asp?page=default">Home</a>
                    <a href="default.asp?page=page2">Page2</a>
                    <a href="default.asp?page=page3">Page3</a>
               </p>
               <div id="content">
    <%
               ' get substitution variable
    
               PageName = Request.QueryString("page") & ".inc"
               if PageName = ".inc" then PageName = "default.inc" end if
    
               ' map object path
    
               oPageName = Server.MapPath(PageName)
    
               ' create file system object
    
               dim FObj
               set FObj = CreateObject("Scripting.FileSystemObject")
    
               ' if exists include it, else display error
    
               if FObj.FileExists(oPageName) then
                 Response.Write FObj.OpenTextFile(oPageName, 1, False, False).readall
               else
                 Response.Write "<p align=""center"">Error! Page Not Found</p>"
               end if
    
               ' clear variable(s)
    
               set FObj = nothing
    %>
               </div>
    </body>
    </html>
    <body>
    See http://www.nsbmiller.somee.com/default.asp?page=default for it in action...

    Sean


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:58 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com