![]() |
![]() |
tudsy |
![]()
Post
#1
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 246 Joined: 30-September 14 Member No.: 21,611 ![]() |
)Hi
I am still having problems in trying to come up with a drop down menu. I have attached the full code and the resulting output (screenshot). The main problem is that I am not generating the options in the drop down menu. Can anyone help? Thanks. Attached thumbnail(s) ![]() Attached File(s) ![]() |
![]() ![]() |
CharlesEF |
![]()
Post
#2
|
Programming Fanatic ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 ![]() |
This is just an outline of what needs to be done. You should do some more research.
In the <select>'s onchange="functionName(image_path);" the actual function should have something like this: CODE functionName(path) newImage is used to pre-load the image and if there is no error then you set the 'src' attribute of the <img> tag.{ var newPath = path; var newImage = new Image(); newImage.src = newPath; newImage.onerror = function() { code to run if there is an error, like file not found } newImage.onload = function() { document.getElementById('imageId').src = newPath; } } |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 23rd June 2024 - 08:54 PM |