Sure. You can type:
function setStatus(message)
{
window.status = message;
return true;
}
Let me tell you something about "coding." You want something to happen. You
want the browser to do something. You're not just giving it a document to
display. You're telling the browser (note that the status bar is not in the
HTML document) to do something, to write a message in its status bar. How do
you tell it to do something? The same way you tell a human to do something.
You give it instructions, just like when you said "I want to add notes at
the bottom..." and I gave you instructions how to do it.
Programming ("coding") is the process of writing instructions to a computer
program, telling it what to do. No big thing. It gets to be a big thing when
you want a big thing. In this case, all you want is for an existing program
(the browser) to put something in its status bar. That's a little thing.
What I gave you is called a function definition. It is like a recipe that
you give to the program. It contains exactly 2 instructions. But once I give
the program the recipe, all I have to do is tell it to execute the recipe -
one instruction. As you're new to "coding" I'll give you a bit more
information about using it. You put it into a script block in the HTML of
your document, like so:
<script type="text/javascript?><!--
function setStatus(message)
{
window.status = message;
return true;
}
// --></script>
When you want to use it, you put an instruction in another script block,
without using a function definition:
<script type="text/javascript?><!--
setStatus("this is the text I want to display");
// --></script>
Since this is not a function definition, it is an instruction to *use* a
function definition. It tells the browser to use the "setStatus" function,
and that that text to put in the status bar is "this is the text I want to
display".
Pretty simple, eh?
You will want to know this. I know, I know, you started making web pages
because you thought it would be just like making a Word document, and
FrontPage would do everything for you. Well, that's true, sort of. But even
Word has a macro language (VBA) for doing things that require more than just
formatting, like typing the same block of text when you want it to, or doing
all kinds of other things that are things to do, not just text to format and
display. JavaScript is like a macro language for web pages.
Here's the thing: Yes, FrontPage can do a *lot* for you, and yes, you can
create web pages without coding, as long as you don't want to do anything
that requires coding to do. It will even write *some* JavaScript for you,
but not a lot. Now, almost everyone like yourself who gets FrontPage and
thinks they will never need to learn any HTML or JavaScript eventually wants
something that doesn't come pre-packaged with the program. That is the way
we humans are. We're creative beings, and we have our own ideas about what
we want. At that point, well, you're just going to have to learn a little.
And this is a perfect thing for you to learn. It's simple, and it introduces
you to a few concepts.
In another year or 2, you'll probably be jumping through all kinds of
JavaScript and DHTML loops, once you've gotten over the initial paranoia.
Think of it as freedom. With a little learning, you can do anything you want
with a web page. Without it, well, you know what your limitations are right
now. You just ran into one of them.
Remember, you are only as limited as you allow yourself to be. How much
freedom do you want? Are you willing to work for it?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but you can't make it stink.