Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
|
|
Drop-down menus and JavaScript |
Page: 1 | Reply |
Aug 30th 2001 | #14930 Report |
Member since: Jun 30th 2001 Posts: 447 |
I have a drop-down menu in the shape of a form and an image dubbed preview: [code] <form name=mediaForm> <select name=mediaID> <option value="1.jpg">1.jpg</option> <option value="2.jpg">2.jpg</option> ... etc. ... </select> <br> <img name=preview src=preview.gif> [/code] What I want to happen is have JavaScript swap the preview.gif with the image the user selects from the drop-down menu based on the value of that option. I've tried adding an onSelect="javascript:document.preview.src='images/whatever.jpg'" to each option tag. This is really no problem as the menu is PHP generated, but I can't get it to work without an error in the browser. Any ideas... P.S. The space between java & script shouldn't exist. It should read javascript. |
Reply with Quote Reply |
Aug 31st 2001 | #14979 Report |
Member since: Jun 30th 2001 Posts: 447 |
I figured it out finally!
|
Reply with Quote Reply |
Page: 1 | Back to top |
Please login or register above to post in this forum |
© Web Media Network Limited. All rights reserved. No part of this website may be reproduced without written permission. Photoshop is a registered trademark of Adobe Inc.. TeamPhotoshop.com is not associated in any way with Adobe, nor is an offical Photoshop website. |