Forums | Email a Colleague | FAQ

Dr. Website Archives

Dr. Website® Archives 2002

August 08, 2002
    Question:
    Dear Dr. Website: HI! Please see http://www.fitnessforlife.com

    See the nice collage logo sorta right center?

    Well, I want that picture and the associated link to change for each day of the week. I have 7 *.inc docs created named Monday.inc, Tuesday.inc, etc etc.

    I have the following code insterted into the index.shtml document :

    <!--#config timefmt="%A" -->
    <!--#include virtual="${date_local}.inc -->

    I really expected this to work. I have my servers configured properly as other standard virtual arguments work for other *.inc docs I have. But this one is failing to load the Tuesday.inc document.

    For the record, the *.inc docs contain the following code:

    <a href="index.shtml">
    <img src="images/collage.gif" alt="Get Fit With Fitness For Life" width="379" height="199" border="0"></a>

    This code of course changes slightly for each document, but the structure is the same from one document to the next.
    Thank You

    Answer:
    How about I save you some work, and show you how to do it using JavaScript?

    <SCRIPT LANGUAGE="JavaScript">

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin
    today = new Date();
    day = today.getDay();
    arday = new Array("sunday.jpg",
    "monday.jpg",
    "tuesday.jpg",
    "wednesday.jpg",
    "thursday.jpg",
    "friday.jpg",
    "saturday.jpg");
    document.write("<img src='" + arday[day] + "'>");
    // End --> </script>

    Works like a champ, and less work on your end.
    Thanks

    --Dr.Website

    Question:
    Dear Dr. Website:

    Thank you, but two things: 1) The images each have to have links to a different page.

    It is not just various images I want to load. The images are linked.

    Thank's

    Answer:
    Then do it like this: <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    today = new Date();
    day = today.getDay();
    arday = new Array("sunday.jpg",
    "monday.jpg",
    "tuesday.jpg",
    "wednesday.jpg",
    "thursday.jpg",
    "friday.jpg",
    "saturday.jpg");

    arURL = new Array("sunday.html",
    "monday.html",
    "tuesday.html",
    "wednesday.html",
    "thursday.html",
    "friday.html",
    "saturday.html");

    document.write("<a href='" +
    arURL[day] + "'><img src='" + arday[day] + "'>
    </a>");
    // End --> </script>
    Thanks,

    --Dr.Website

    The second part of the last question
    Question:
    Dear Dr. Website:
    This is Javascript, which goes in the header of the document. What do I use for code in the body of the document where the linked images go? What tags do I use?

    Answer:
    This particular JavaScript goes in the body, not in the header.
    Thanks

    --Dr.Website

    Question:
    Dear Dr. Website:
    How do I know how much file storage I will need in order to launch my small business website? I do not know the difference between 1 mb and 100 mb!

    Can you show me sample sites and how much space they are using so I have a better idea? I have about 50 products I would like to show and allow people to purchase with a shopping cart via paypal.

    I don't know which plan to purchase because I have no idea how much file space I will have with the different plans.

    The numbers mean nothing to me as I am webmaster illiterate! Please help!

    Thank you!

    Answer:
    While it is impossible to say exactly how much space you will need for a typical site with ecommerce capabilities, the "average" site can get by with less than 100 MB of space for their web pages and accompanying images.

    That said, if you have a very large number of images on your site, that number would increase. Also, if you have lots of traffic to your site, and you have logging turned on, the log file itself can grow to over 100MB in size within a short period of time.

    All these things considered, you would do well to at least have 100 MB at your disposal. Within several months you will know how much space you will regularly need, and can adjust your account thusly.

    Six years ago, the average computer had a 40 MB hard drive....today, the average new computer ships with 6-20 GB hard drive. One GB (gigabyte) is equal to 1000 MB (megabytes).

    So you can see, 100 MB is not that large these days.
    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