How do I have a table cell fetch another page to display within the cell?

Discussion in 'HTML' started by Phillip Roncoroni, Apr 4, 2004.

  1. I'm testing out an Google AdSense, and I'd like to have the following:

    - A two column, one row table
    - Left cell, 100% size, top justified, with the page content
    - Right cell, top justified, displaying the ad code

    Now, since my site is almost entirely static, I don't want to have to
    re-edit all my pages again in the future if the ad program code changes, or
    if I decide to opt out.

    I want the ad code in a file like adcode.htm, and I want the right cell to
    fetch that page and display it everytime.

    How do I go about doing this?

    Thanks in advance.

    --

    goodcow
    goodcowfilms.com
    metalcowsolid.com
     
    Phillip Roncoroni, Apr 4, 2004
    #1
    1. Advertising

  2. Phillip Roncoroni wrote:

    > I'm testing out an Google AdSense, and I'd like to have the following:
    >
    > - A two column, one row table
    > - Left cell, 100% size, top justified, with the page content
    > - Right cell, top justified, displaying the ad code


    http://www.allmyfaqs.com/faq.pl?Tableless_layouts

    > Now, since my site is almost entirely static, I don't want to have to
    > re-edit all my pages again in the future if the ad program code changes,
    > or if I decide to opt out.


    http://www.allmyfaqs.com/faq.pl?Include_one_file_in_another

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
     
    David Dorward, Apr 4, 2004
    #2
    1. Advertising

  3. In article <h5%bc.5263$>, Phillip Roncoroni
    <> wrote:

    > I'm testing out an Google AdSense, and I'd like to have the following:
    >
    > - A two column, one row table
    > - Left cell, 100% size, top justified, with the page content
    > - Right cell, top justified, displaying the ad code
    >
    > Now, since my site is almost entirely static, I don't want to have to
    > re-edit all my pages again in the future if the ad program code changes, or
    > if I decide to opt out.
    >
    > I want the ad code in a file like adcode.htm, and I want the right cell to
    > fetch that page and display it everytime.
    >
    > How do I go about doing this?
    >
    > Thanks in advance.


    If you must stay with a table look up using an iframe. It's easy to use
    but many people in this group don't like it.
    <iframe src="xxx" style="xxx">no iframe message</iframe>
    Put above in the table cell. Set its size, borders, scroll bars, etc.
    using css.

    --
    Dennis M. Marks
    http://www.dcs-chico.com/~denmarks/
    Replace domain.invalid with dcsi.net


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Dennis M. Marks, Apr 4, 2004
    #3
  4. "Dennis M. Marks" <> wrote in message
    news:040420041555155551%...
    > In article <h5%bc.5263$>, Phillip Roncoroni
    > <> wrote:
    >
    > > I'm testing out an Google AdSense, and I'd like to have the following:
    > >
    > > - A two column, one row table
    > > - Left cell, 100% size, top justified, with the page content
    > > - Right cell, top justified, displaying the ad code
    > >
    > > Now, since my site is almost entirely static, I don't want to have to
    > > re-edit all my pages again in the future if the ad program code changes,

    or
    > > if I decide to opt out.
    > >
    > > I want the ad code in a file like adcode.htm, and I want the right cell

    to
    > > fetch that page and display it everytime.
    > >
    > > How do I go about doing this?
    > >
    > > Thanks in advance.

    >
    > If you must stay with a table look up using an iframe. It's easy to use
    > but many people in this group don't like it.


    Well I don't *have* to stay within a table, it's just that html isn't what I
    do best, far from it, and I hate using Frontpage and Dreamweaver in the
    first place. I just figured it'd be the easiest way to do it within
    Frontpage, since that's what I use. Why don't people here like iFrames?

    > <iframe src="xxx" style="xxx">no iframe message</iframe>
    > Put above in the table cell. Set its size, borders, scroll bars, etc.
    > using css.


    I tried using an iFrame, and my reslts are either:
    a) A stupid box, with scrollbars and stuff
    b) My page not showing up. I tell it no borders, no scrollbars, top
    alignment, and I specify 100% size for the width and height, because I
    assumed it would then shape itself to be only as large as the resulting
    page, but since the resulting page is blank except for some JavaScript ad
    code, it ends up not displaying, since it seems to shrink it down to 1x1 or
    something.

    Other things I've tried since posting my original inquiry here are:
    <script language="javascript" src="adsense.js"></script>

    This works for some people who tested it for me, but for me IE displays a
    syntax error.

    <? include "include.htm" ?>
    That worked, but it'll require me to rename all my htm files to php, and
    also edit all the htm links to php as well, which I don't want to do.

    --

    goodcow
    goodcowfilms.com
    metalcowsolid.com

    >
    > --
    > Dennis M. Marks
    > http://www.dcs-chico.com/~denmarks/
    > Replace domain.invalid with dcsi.net
    >
    >
    > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    > -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Phillip Roncoroni, Apr 5, 2004
    #4
  5. "Dennis M. Marks" <> wrote in message
    news:040420041555155551%...
    > In article <h5%bc.5263$>, Phillip Roncoroni
    > <> wrote:
    >
    > > I'm testing out an Google AdSense, and I'd like to have the following:
    > >
    > > - A two column, one row table
    > > - Left cell, 100% size, top justified, with the page content
    > > - Right cell, top justified, displaying the ad code
    > >
    > > Now, since my site is almost entirely static, I don't want to have to
    > > re-edit all my pages again in the future if the ad program code changes,

    or
    > > if I decide to opt out.
    > >
    > > I want the ad code in a file like adcode.htm, and I want the right cell

    to
    > > fetch that page and display it everytime.
    > >
    > > How do I go about doing this?
    > >
    > > Thanks in advance.

    >
    > If you must stay with a table look up using an iframe. It's easy to use
    > but many people in this group don't like it.
    > <iframe src="xxx" style="xxx">no iframe message</iframe>
    > Put above in the table cell. Set its size, borders, scroll bars, etc.
    > using css.


    Here's an example:
    http://www.goodcowfilms.com/inline.htm
    This works, with a static width/height of the ads, and refers to another
    iFrame, adsense.htm.

    My reasoning behind trying this, was that I didn't want to put a static
    value for the width/height, because that defeats the purpose of fetching a
    page so I can change it in the future.

    Since doing it with the 100% width/height didn't work, because the page was
    technically blank, except for ad code, I thought maybe an iFrame linking to
    an iFrame with a static width/height would work, that way I could change
    iFrame1 easily in the future, and not be stuck with a static value. But it
    doesn't work, it still shows up as white space, because I assume the 100%
    value and no "visible" content is shrinking it down.

    *a few minutes later*

    After re-sizing iFrame1 to static values in FrontPage, to even see if the
    iFrame in an iFrame theory would work, and it did, I set it back to 100%,
    and now my idea about seems to be working, and without a static value, just
    a 100% value. I guess I can chaulk that up to FrontPage being a piece of
    crap?

    I'll continue to mess around with this now, and probably break some
    things...

    --

    goodcow
    goodcowfilms.com
    metalcowsolid.com

    >
    > --
    > Dennis M. Marks
    > http://www.dcs-chico.com/~denmarks/
    > Replace domain.invalid with dcsi.net
    >
    >
    > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    > -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Phillip Roncoroni, Apr 5, 2004
    #5
  6. Phillip Roncoroni

    Keeper Guest

    one word... iframe

    lol lots o luck
    Later,
    Keeper
     
    Keeper, Apr 5, 2004
    #6
  7. "Keeper" <> wrote in message
    news:...
    > one word... iframe
    >
    > lol lots o luck
    > Later,
    > Keeper
    >
    >


    But it's not working unless I give it a static width/height, which defeats
    the point, because if I want to change it in the future, I have to change
    the code on every single page then.

    --

    goodcow
    goodcowfilms.com
    metalcowsolid.com
     
    Phillip Roncoroni, Apr 5, 2004
    #7
  8. Phillip Roncoroni

    brucie Guest

    in post: <news:3E0cc.9767$>
    "Phillip Roncoroni" <> said:

    > <? include "include.htm" ?>
    > That worked, but it'll require me to rename all my htm files to php,


    no it wont

    > and also edit all the htm links to php as well,


    no it wont

    > which I don't want to do.


    you don't have to.

    stop being sooo gowd damn negative. all you have to do is tell your
    server that files with a .html extension are php (assuming you just
    don't want to do a simple search and replace to change .html to .php)

    stick the below in a .htaccess file[1] for the directory you want the
    directives to apply to. child directories inherit the directives so if
    you stick it in your root the directives will apply to all of your site.


    AddType application/x-httpd-php .html


    [1] a .htaccess file is a plain text file named as shown. if you create
    the file with notepad save the file with quotes to prevent notepad from
    adding a .txt extension i.e: ".htaccess"

    --
    b r u c i e
     
    brucie, Apr 5, 2004
    #8
  9. "brucie" <> wrote in message
    news:c4qskn$2m31ka$-berlin.de...
    > in post: <news:3E0cc.9767$>
    > "Phillip Roncoroni" <> said:
    >
    > stick the below in a .htaccess file[1] for the directory you want the
    > directives to apply to. child directories inherit the directives so if
    > you stick it in your root the directives will apply to all of your site.
    >
    >
    > AddType application/x-httpd-php .html
    >
    >
    > [1] a .htaccess file is a plain text file named as shown. if you create
    > the file with notepad save the file with quotes to prevent notepad from
    > adding a .txt extension i.e: ".htaccess"


    I wasn't being "negative," I asked my host if there was a way to make the
    server run all html files as php, and the answer I got was no.

    I'll try what you suggested though. Does this work on every Unix server, or
    is it hit and miss?

    --

    goodcow
    goodcowfilms.com
    metalcowsolid.com

    >
    > --
    > b r u c i e
     
    Phillip Roncoroni, Apr 5, 2004
    #9
  10. Phillip Roncoroni

    Kris Guest

    In article <3E0cc.9767$>,
    "Phillip Roncoroni" <> wrote:

    > <? include "include.htm" ?>
    > That worked, but it'll require me to rename all my htm files to php, and
    > also edit all the htm links to php as well, which I don't want to do.


    The importance of choosing extension-independant filenames:

    instead of domain.com/contact.php or domain.com/contact.php, you use
    domain.com/contact/

    or changing your .htaccess file to parse .htm/.html files as PHP.

    --
    Kris
    <> (nl)
    <http://www.cinnamon.nl/>
     
    Kris, Apr 5, 2004
    #10
  11. "brucie" <> wrote in message
    news:c4qskn$2m31ka$-berlin.de...
    > in post: <news:3E0cc.9767$>
    > "Phillip Roncoroni" <> said:
    >
    > AddType application/x-httpd-php .html
    > --
    > b r u c i e


    Your method works.

    Thank you.

    --

    goodcow
    goodcowfilms.com
    metalcowsolid.com
     
    Phillip Roncoroni, Apr 5, 2004
    #11
  12. Phillip Roncoroni

    brucie Guest

    in post: <news:bjccc.10210$>
    "Phillip Roncoroni" <> said:

    >> AddType application/x-httpd-php .html


    > Your method works.


    YAY! now move to a host that doesn't lie to you

    > Thank you.


    kissy

    --
    b r u c i e
     
    brucie, Apr 5, 2004
    #12
  13. "brucie" <> wrote in message
    news:c4rjt0$2l73o6$-berlin.de...
    > in post: <news:bjccc.10210$>
    > "Phillip Roncoroni" <> said:
    >
    > >> AddType application/x-httpd-php .html

    >
    > > Your method works.

    >
    > YAY! now move to a host that doesn't lie to you


    Or maybe they just didn't know.

    I think my host hires people who don't really know what they're doing for
    the 24/7 live AIM support, but otherwise, I love my host. Blazing fast
    speed, seemingly always up, and lots of features. They even recently
    installed Fantastico on the cPanel, so I don't even have to manually install
    modules now.

    50GB transfer, 6GB space, $25 a month.

    Granted, I usually go over 50GB transfer each month since my site is a
    multimedia one, but I still like my host.

    --

    goodcow
    goodcowfilms.com
    metalcowsolid.com
     
    Phillip Roncoroni, Apr 5, 2004
    #13
  14. "Kris" <> wrote in message
    news:4all.nl...
    > In article <3E0cc.9767$>,
    > "Phillip Roncoroni" <> wrote:
    >
    > > <? include "include.htm" ?>
    > > That worked, but it'll require me to rename all my htm files to php, and
    > > also edit all the htm links to php as well, which I don't want to do.

    >
    > The importance of choosing extension-independant filenames:
    >
    > instead of domain.com/contact.php or domain.com/contact.php, you use
    > domain.com/contact/


    So basically every link on every page should route to a directory with the
    filename you wanted it to be, that way you have no extension problems in the
    future? That seems rather messy, and unorganized.

    >
    > or changing your .htaccess file to parse .htm/.html files as PHP.


    Or that, thanks to brucie.

    --

    goodcow
    goodcowfilms.com
    metalcowsolid.com

    >
    > --
    > Kris
    > <> (nl)
    > <http://www.cinnamon.nl/>
     
    Phillip Roncoroni, Apr 5, 2004
    #14
  15. Phillip Roncoroni wrote:

    > So basically every link on every page should route to a directory with the
    > filename you wanted it to be, that way you have no extension problems in the
    > future? That seems rather messy, and unorganized.


    No. You can use the Apache MultiViews option instead.

    That way, instead of pointing to:
    http://www.goddamn.co.uk/tobyink/scratch/menu.html

    I can point to:
    http://www.goddamn.co.uk/tobyink/scratch/menu

    and the same file will be loaded.

    Then at a later date I can switch from a .html file to a .php file, or
    ..cgi or even .mp3, .jpeg or .avi if I wanted.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Apr 5, 2004
    #15
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Goldin

    Table in a cell of another table

    Mark Goldin, Aug 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    341
    Mark Goldin
    Aug 19, 2004
  2. Sturny Gerard
    Replies:
    2
    Views:
    4,646
    David Dorward
    Dec 27, 2003
  3. Benny Ng
    Replies:
    1
    Views:
    553
    bruce barker
    Jan 4, 2007
  4. Thomasa Gregg
    Replies:
    1
    Views:
    180
    Eliyahu Goldin
    Jun 9, 2004
  5. Steve
    Replies:
    4
    Views:
    399
    James Willmore
    Nov 28, 2003
Loading...

Share This Page