A. Here's a couple of sites
you might want to check out:
hotwired.lycos.com --
excellent beginner's tutorial, read this first.
hotwired.lycos.com
-- pretty good intro tutorial on PHP & MySQL.
www.onlamp.com
-- O'Reilly publishers' PHP section, always
high quality tutorials and articles here.
www.devshed.com -- mostly, but not exclusively,
advanced tutorials.
www.php.net - the manual
page is indispensable, so I thought I'd
mention that too.
*** This question was submitted to our Mentor Community. The answer was provided
by Rich Barton, one of our PHP Mentors.
Q. I have defined the frames
like this:
<frameset cols="20%,80%" frameborder="0" framespacing="0" border="0">
<frame src="left.html" name="left" marginwidth=0 border=0 noresize>
<frame src="home.html" name="right" marginwidth=0> </frameset>
Since I added (w3c recommendation) the following information to my right
frame (IE6.0):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
I have the problem that the vertical scrolling bar of the right frame
doesn't disappear, even if the content isn't larger than the available
space.(for exampe 60 lines of blah<br>blah) It only disappears if the
content does also fit the frame in height.
How can I make the vertical scroll bar appear only if the content is
larger than the frame?
A. Try setting the scrolling
attribute as such:
<frame src="left.html" name="left" marginwidth=0 border=0 noresize
scrolling="no"> <frame src="home.html" name="right" marginwidth=0
scrolling="auto">
You can set it to yes, no, or auto. Auto will put the scrollbar on the page only
if the content goes off the page.
*** This question was submitted to our Mentor Community. The answer was provided
by Ryan Flynn, one of our HTML Mentors.
Q. You may remember the one of
the questions in the Q & A section in issue 165. You said that you used server
side includes to handle different parts of your site that are common to pages.
However, the extensions of the pages in your website are .html, not .asp. So,
how can they work? I know that they only work if the page extensions are asp.
The html pages are discarded for processing. So, the question is, how do you
make it work in pages with html extension.
A. You can include pages like
this:
<!--#include virtual="yourfolder/yourpage.html"
-->
This works only if your web server is
configured to recognize the #include. Basically what happens is the server has
to read through your page and look for any instances of #include, get the
appropriate files and insert them into your page. Because ASP pages are
interpreted, the server effectively "reads" every page before it sends the page
to the browser. With HTML that's not necessarily the case. In the case of HTML
pages the server usually just finds the page and then sends it on its merry way
not caring what its contents are. You will have to check with your host provider
or server administrator to see if #include is available to you in HTML pages.
Also, be careful when including
pages. If you try to combine pages and end up with multiple <head> and <body>
tags, for example, you will confuse the heck out of the browser.
News Goodies
Have you been wondering whether
learning to program in a scripting language is right for you and where to begin?
Click here to read the article
We talked about ASP.NET in this issue
of the newsletter. Do a little comparison shopping with Java 2 in this article.
Click here to read the article
Alright, for all you Mac fans out
there Apple has just released its first 1GHz machine. With the newly designed
iMac and more powerful G4, Apple is working hard to make you want to be a Mac
owner.
Click here to read the article
Quiz Answer
You would use SetTimeout(). This
allows you to set a delay (in milliseconds) before a function is called.
For example:
SetTimeout(OpenWindowFunction(),60000);
The above example would delay calling
OpenWindowFunction for 60000 milliseconds which is the equivalent of 1 minute.
And Remember This . . .
Have you ever heard of the name
Fibonacci? In the early 13th century he invented a number sequence that goes
like this - 1,2,3,5,8,13,21 etc. It is simply a series of numbers where each
number is the sum of the previous two numbers, except for the first two of
course. He originally came up with the sequence to explain the breeding rate of
rabbits but found that the sequence applied to a great many other things in
nature. For example, if you count the clockwise and counterclockwise spirals of
seeds in the head of a sunflower you will find the Fibonacci numbers.
Thanks for reading Goodies to Go!