Forums | Email a Colleague | FAQ

Dr. Website Archives

Dr. Website® Archives 2003

January 16, 2003

    Question:
    Dear Dr. Website:
    For years I've been updating the copyright of the current year to each web page, within many site directories, on every web site that our company maintains ... in other words, each web page has to be updated from the year 2002 to 2003 which is so very time consuming ... we have several clients and hundreds of pages!

    Is there a JavaScript coding, or some type of browser-friendly & easy way, to put the copyright text in ONE area of the various sites' server so EACH page can refer to and show the copyright text on each web page?

    I have also thought about adding a small .jpg or .gif graphic file with the copyright text, whereas the one graphic can be updated each year. Is that the best solution?

    This would save me hours of updating time each year!

    Thanks,

    Answer:
    The easiest way to do this is to use a Server Side Include (SSI). This would enable you to pull the info from one page into another page. The way it's done varies from Web server to Web server, but generally it is as follows: <!--#include virtual="yourfile.html" -->

    SSI must be enabled on your server for this to work. Then you could just create a Web page with nothing but the table full of data, and use an SSI to include that page on whatever page you wish.

    Files utilizing SSIs may need to use a special file extension that is set up in the server configuration file, which is usually .shtml. But if your server is set up to implement SSIs in files ending with .htm or .html, then you won't need to use a special extension. Your server administrator can tell you if it will be necessary for you to change the file extension in your files that utilize SSIs.

    However, you still will have to replace the copyright data on each page, to the Server Side Include code. After that, all you have to do is make the changes to the SSI file. The SSI will make the changes to all of your pages.

    For more Info on SSI please see this article: http://www.wdvl.com/Authoring/SSI/Intro/index.html

    Thanks,

    --Dr.Website

    Question:
    Dear Dr. Website:
    I am having a real problem with videos on a page under Netscape. Particularly, these are Quicktime movies placed in their own embedded players. When you scroll the page, the videos slide up or down behind the page depending on direction of scroll. This does not occur if the videos are playing but that slows the computer. I imagine that not every computer may show the problem, but it's real and ugly!

    Do you know about this problem?

    As an example, the following web site has a QuickTime movie. If you reduce the size of the page to force scroll bars, you may see the problem as you scroll up and down.

    http://www.moderntv.com/modtvweb/qtclips/emb-test.htm

    Answer:
    Unfortunately this sounds like a browser bug that there isn't much you can do about. NS and MSIE react differently to different types of media, and that's just the way that NS handles it. You could always open a window to a specific size, and disallow scrolling so folks won't be able to scroll (but realize that when you do that, you're taking control away from your visitors--which is something that we tend to discourage web developers from doing).

    --Dr.Website

    Question:
    Dear Dr. Website:
    Could you please tell me if there is a way to create a hyperlink that will specify which sub-page has to be loaded into a specific frame in a frames-based site? I want to post a link on one of my sites (say "Site 1") to my other site ("Site 2").

    However, the Site 2 is based on frames, so just specifying the address of it in Site 1 will open the whole Site 2 frameset with the pages defined in it. Specifying the sub-page I want (out of "main" frame), will open it by itself and not within the frameset. Is there any way to specify it so in the link that when the frameset is opened in a (new) window, specific frame will load specific file and not the default one.

    Maybe it is easier inserting some Java into the subpage of the "to-be-linked" site (i.e. Site 2) so that it would reload itself into the frameset? Something like an opposite effect of the "prevent framing" code.

    Thanks in advance.
    Thanks

    Answer:
    As I was researching my reply to you, I stumbled across a script on our own JavaScriptSource.com:

    http://javascript.internet.com/page-details/content-protector.html Here's part of the description of the script from that page:

    "If your content page is loaded directly (not in frames) the page is reloaded in your frames."

    This way you can link to the page itself, and the page will then load within the frameset as it is supposed to.

    Thanks,

    --Dr.Website ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ForumsEmail a Colleague · FAQ

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs