Hi Nina,
Thanks Kevin and Trevor. I'm sorry to be slow on the uptake, but I'm not a
programmer and am not sure how to handle your suggestions.
Any time you talk about a web page or an application *doing* something, such
as swapping out an image when a certain event happens, you are talking about
programming. Programming is the art/science of writing instructions to a
computer application that cause it to perform some task or tasks.
Now, the reason I'm telling you this is that you say you're not a
programmer, but you asked "How do I get the descriptions of the pictures to
change in the same layer?" Of course, the reason you asked this is because
FrontPage provided a tool to write some JavaScript for you, in other words,
to do some programming for you, but you wanted it to do something just a wee
bit outside of what it was designed to do. And of course, not being a
programmer, you were stuck.
Now, just stick with me a for a little ways, and you'll see where I'm going
with this.
A program like FrontPage, Word, or, for example, any Microsoft Office
product, contains a number of tools to enable the user to add functionality
to the product they use that program to produce, such as a web page, a Word
document, etc. These are invariably the sorts of things that are most
commonly wanted by the users. But there are myriads of things which an HTML
page, for example, *could* do, and there is no way to make a large enough
set of tools to do them all. After all, for every tool, the user would have
to learn something more about how to use the program. How would you find the
one you were looking for among all those thousands of tools?
But wait, in fact, such a tool set *does* exist. And while you don't have to
"be a programmer" to use this set of tools, you *do* have to know something
about programming to use them. In fact, several sets of tools are available,
each one more difficult to use, but more powerful than the one above it.
For example, in Word (and in FrontPage), you can create macros. These macros
are written in VBA (Visual Basic for Applications). A macro is a set of
instructions that is relatively simple to put together. Each of these
instructions encapsulates a block of lower-level instructions in a
convenient manner, which requires less effort to learn.
In FrontPage, because you are working with a web page, you can also use
client-side scripting (JavaScript) to work with the objects in the HTML
document, to cause them to behave in a certain way, depending upon other
things (hence, the term "behavior"). JavaScript and VBScript are scripting
languages. A scripting language is similar to VBA, in that it is a
simplified type of programming based upon convenient combinations of
lower-level, more difficult to learn, programming instructions.
So, where I'm going with this is: Don't be afraid to learn a *little bit* of
"programming" (such as some JavaScript). After all, you were smart enough to
learn how to use FrontPage; obviously, you could learn a little JavaScript.
There are lots of web sites out there that have tutorials, demonstrations,
and articles about how to use it. And it's not exactly "programming." It's
"scripting." Think of it as "macros for web pages." Once you learn a little,
you may actually enjoy it! And you will be able to do a lot more of these
sorts of "just outside the lines" types of things in your web site, with
very little help.
And of course, when you *do* need help, we're all here to help each other!
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
We got a sick zebra a hat,
you ultimate tuna.
Nina said:
Thanks Kevin and Trevor. I'm sorry to be slow on the uptake, but I'm not a
programmer and am not sure how to handle your suggestions. I was hoping to
use the Frontpage 2003 interface to solve the swapping text problem just
as I
did with the swap image. If there is a simple explanation for how to
insert
the code you suggest into Frontpage and how to tailor with my text, please
advise.
Nina
Trevor L. said:
Kevin Spencer wrote:
http://www.google.com/search?hl=en&q=JavaScript+image+swap
Off you go.
--
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
We got a sick zebra a hat,
you ultimate tuna.
I am using swap image behavior to change the pictures in the same
layer when
the mouse goes over the images in the other layers. How do I get the
descriptions of the pictures to change in the same layer? Or do I
have to add
another layer with text. Then how do I swap the text that goes with
each image.
Thanks, Nina
Hi again Nina,
One of the references google brought up from Kevin's suggestion is the
following example
I have modified it to add a caption which also alters on mouseover or
mouseup.
<head>
<title>My Page</title>
<head>
<script type="text/javascript">
if (document.images) {
var button1_up = new Image();
button1_up.src = 'button_up.gif";
var button1_over = new Image();
button1_over.src = 'button_over.gif";
}
function over_button() {
if (document.images) {
document["buttonOne"].src = button1_over.src
document.getElementById("caption").innerHTML = "Caption for
button_over.gif"
}
}
function up_button() {
if (document.images) {
document["buttonOne"].src = button1_up.src
document.getElementById("caption").innerHTML = "Caption for
button_up.gif"
}
}
</script>
<body>
<a href="file.html"
onMouseOver="over_button()"
onMouseOut="up_button()">
<img src="button_up.gif" alt="click me"
width="XX" height="YY" name="buttonOne"
border=0>
<span id="caption">Caption for button_up.gif</span>
</a>
</body>
</html>
You may have to make changes to get the caption exactly where you want
it,
but it should work fine.
(I haven't tested this but my changes are small. Let me know if there are
problems)