PDA

View Full Version : Javascript question


Fig
01-17-2001, 02:55 AM
Hi all,

I'm wondering if anyone can help me with this javascript question:

I am creating my online portfolio and would like to use javascript for both aesthetic and functionality reasons. I am using mouseover buttons to activate corresponding images of my artwork. When someone puts the mouse over each button, a new image pops up. So far, so good. The thing I can't figure out is how I can get the area with the images to go blank when the mouse is not over a button. Right now, the last image activated by a button remains displayed. I don't have my website uploaded yet, or I could show you a sample... hopefully soon.

Any help would be much appreciated.

Roan
01-17-2001, 06:57 AM
Would you post your code here, please, Fig. HEAD and a sample of the BODY for the images.

Thanks!

------------------
<FONT face="Script MT Bold"><FONT COLOR="#AB4835"><FONT size="5">Roan</FONT s></FONT c></FONT f>
<FONT COLOR="#8A1010">Nan dèanadh mo làmh mar a dh'iarradh mo shùil!</FONT c>
-- <FONT size="1">If my hand could do as my eye would desire!</FONT s>
RoanStudio.com (http://RoanStudio.com) &lt;-- pastel open stock vendor sources & reviews!

jweir
01-17-2001, 06:58 AM
Fig,

When you do a OnBlur have a blank image place there. OnBlur means as you leave the area to this action. make sure that blank image is the same size as the image you are replace.. hope this helps

Jim


------------------
I know I know nothing-- Plato

Roan
01-17-2001, 07:34 AM
Jim:

You're assuming he's using OnBlur. There's a zillion different ways to do this code -- that's why I asked for a copy :P

------------------
<FONT face="Script MT Bold"><FONT COLOR="#AB4835"><FONT size="5">Roan</FONT s></FONT c></FONT f>
<FONT COLOR="#8A1010">Nan dèanadh mo làmh mar a dh'iarradh mo shùil!</FONT c>
-- <FONT size="1">If my hand could do as my eye would desire!</FONT s>
RoanStudio.com (http://RoanStudio.com) &lt;-- pastel open stock vendor sources & reviews!

jweir
01-17-2001, 11:52 AM
Thank Roan,

I what thinking the easy way of doing it... hehe... I just start coding in my head then answer the question... hehehe

Jim

------------------
I know I know nothing-- Plato

Fig
01-17-2001, 05:28 PM
Hi,

I tried posting my code here but it was interpreted as "actual" code, and appeared garbled in the forum list. I am still new to this forum and don't know how to post code that you can read as is.

Roan
01-17-2001, 09:22 PM
Fig,
Try using the HTML code tags, like this:

&lt;CODE&gt;
&lt;/CODE&gt;

See if that works. Failing thus, if you send it to me via email, I'll post it here for you.

------------------
<FONT face="Script MT Bold"><FONT COLOR="#AB4835"><FONT size="5">Roan</FONT s></FONT c></FONT f>
<FONT COLOR="#8A1010">Nan dèanadh mo làmh mar a dh'iarradh mo shùil!</FONT c>
-- <FONT size="1">If my hand could do as my eye would desire!</FONT s>
RoanStudio.com (http://RoanStudio.com) &lt;-- pastel open stock vendor sources & reviews!

Fig
01-21-2001, 05:00 AM
Thanks anyway, Roan. I ended up doing the images in a different way as it turned out. I'm not much of a javascript programmer, I'm an artist, and I would rather spend time on the art than the coding. I am concentrating on the images now.

Roan
01-22-2001, 10:49 AM
Sorry I haven't had time to look at your script, Fig. I'm not much into javascript either, I code in perl and javascript gives me a headache :P Takes me awhile to go through the code.



------------------
<FONT face="Script MT Bold"><FONT COLOR="#AB4835"><FONT size="5">Roan</FONT s></FONT c></FONT f>
<FONT COLOR="#8A1010">Nan dèanadh mo làmh mar a dh'iarradh mo shùil!</FONT c>
-- <FONT size="1">If my hand could do as my eye would desire!</FONT s>
RoanStudio.com (http://RoanStudio.com) &lt;-- pastel open stock vendor sources & reviews!

pixelscapes
01-29-2001, 10:23 AM
If it helps...

Assuming you're using an OnMouseOver approach, you can use OnMouseOut to replace the image with a blank white or black rectangle.

I'm not totally sure what you're doing but from what you describe, it sounds like you'll have people mouse over one area and have the appropriate image or thumbnail appear elsewhere. A suggestion -- make sure those images are preloaded. Otherwise it'll take so long to load that the mouseover will be less effective, even if it's a low-K thumbnail. Just a second's delay will ruin the effect you're going for.

Hope this helps.

-=- Jen "Mousey" de la Cruz
http://www.Pixelscapes.com and http://www.BewareOfArt.com