Top.Mail.Ru
? ?
Javascript's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Monday, June 12th, 2006

Time Event
3:11p
Noob Questing
After hours of fiddling fruitlessly with search engines i decided to try my luck on LJ.
I was wondering whether there is a Java code that allows you to hover over one image, causing you to get another image and link.
I don't quite know how to explain it, and i am afraid it might be a flash code (which i know nothing of).

Sometimes when one goes to a site, one will see an image (image A) & when one hovers over it, it becomes another image (image B).

image A + hover = image b that when clicked sends one to another page.

What i am trying to do is have a table of equal sized pictures, and when people hover over the different images they can be redirected to another part of the website. I know how to do that which just an image and a href encompassing the image, but in this case i'd like the image to change to another image and become a link.

I hope i'm making myself understandable and not too fussy.
I've asked various people and searched but can't find anything.


Thanks in advanced =)
4:46p
Here's a question to all you RegEx gurus out there.

I've got a JavaScript dice roller that I made many years ago when I was first learning JS and have been keeping updated as new ideas for features hit me. It's specifically meant for people playing RPGs, like D&D.

Now, I'd like to change it so that instead of having to fill in as many as 4 boxes to specify the custom die rolls, you can just type in a string like "Move Silently:1d20+4".

I've tried to do a regex before for just the 1d20+4 part, and had limited success, but to be totally frank regular expressions give me a headache. I was hoping someone here would be willing to help me!

Format:

Label:XdY+/-Z

Where:

All white space is ignored. I.e. 1d20+4 is the same as 1 d 20 + 4.

Label is optional and can consist of anything. If it is present, a colon must be there. Otherwise there cannot be a colon.

x is optional. If present, it must be an integer.

d can be upper or lower case.

y is mandatory. It is an integer.

The + or - will only be present and will always be present if Z if specified.

Z is optional. If present, it must be an integer.

Oh, and last but certainly not least, is there anything special I need to know about implementing the RegEx? I want to be sure that the entire string validates, but I've seen before how if I typed, say, R2-D2, it would validate because D2 is a valid pattern according to my above rules.

Thanks!

<< Previous Day 2006/06/12
[Calendar]
Next Day >>
About LiveJournal.com
Image