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: http://www.bellissimab.com/new/stones.php please let me know if you need me to elaborate on anything. Tnx, Shooka
This works, but I know it could be done better. I'm good at php, not javascript Before your body tag: <?php if(is_numeric($_GET['month'])) { $y_position = $_GET['month'] * 125; //may need to adjust the 125. $div_id = 'id'.$_GET['month']; echo " <script> function change_border(id) { var n = document.getElementById(id); n.style['border'] = '1px solid #ff0000'; } </script>"; } else { $y_position = 0; echo " <script> function change_border(id) { } </script>"; } ?> Code (markup): For your body tag: <body onload="window.scrollTo(0,<?php echo $y_position;?>); change_border('<?php echo $div_id; ?>')"> Code (markup): Then stick in id='id1' into your td tags (for example: <td class="stone_desc" id='id1'>) Once again, sorry for my haggard solution, but it works! -the mole