View Full Version : logic problem - small interactive module

02-19-2006, 12:12 PM
hey everyone, ive got 12 images (jewellery stones) with description. each stone and description in a different <div>.

each stone represents a month of the year.

im trying to create a interactive module where the user could type his/ her month of birth and the related stone <div> will be highlited (simple indication like a border around the <div>) the all thing is on the same page, and once the user submit his / her DOB the page will just refresh and position itself on the related stone.

anyone got any ideas how to do it?

you can view the page ive got so far at:


please let me know if you need me to elaborate on anything.

Tnx, Shooka
Edit/Delete Message

02-19-2006, 12:35 PM
If you add an anchor in front of each image, you should be able to do that fairly simply by using a switch based on the month that the user submits.

header('Location: '.$_SERVER['PHP_SELF'].'?highlight=garnet#Garnet');
header('Location: '.$_SERVER['PHP_SELF'].'highlight=amethyst#Amethyst');
header('Location: '.$_SERVER['PHP_SELF'].'highlight=aquamarine#Aquamarine');

By the way, you really should take a look at your site in Firefox. :eek:

Update: Since you also want to highlight the selected stone, you'll probably want to send a variable along with that to give the highlight.
Then use an if statement at the point of the image to style your div surrounding the selected stone.

echo ' class="highlight"';

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum