Alright I'm in a web design II class and I need some help. Were making a web page that is similar to an I-Spy book, that is there is 2 frames. The top is 80% of the page and the bottom is 20%. Each time you find an item in the picture and click it, it is supposed to cross off that word in the word bank on the bottom. Now I'm using map edit to create the links, but how do I make it so when you click the word gets crossed off. I could have them go in a certain order but then I do not know how to make map edit update both of the frames so that you can't click the same picture again. Could use some help here.
You need javascript help, not HTML help. Give your items an onClick event that calls a function that changes the text-decoration to strikethrough on the appropriate word in your word bank. I can't give specific examples without seeing all your HTML.
Make a CSS class and then make a function to change it.
You'll have to put each link in a div or something so that you can assign it an ID, then pass the ID to the function to change it.
Something like this:
You'll have to put each link in a div or something so that you can assign it an ID, then pass the ID to the function to change it.
Something like this:
Code:
<style type="text/css"> .crossout { text-decoration: line-through } </style> <script type="text/javascript"> function crossout(id) { var el=document.getElementById(id); el.className='crossout'; } </script> <a href="javascript:crossout('apple');">I Spy an Apple!</a><br /> <a href="javascript:crossout('computer');">I Spy a Computer!</a><br /> <div id="apple">Apple</div> <div id="computer">Computer</div>
Last edited by CrazeD (2008-04-15 13:18:40)
I used the java script way to cross them out, did some looking around. Thanks for both answers, really appreciate it.