Quote:
Originally Posted by bigcasey123
I have a drop menu and i want a image to change when a option is chosen form it.
Can this be done with php or do i need javascript? I already downloaded the logos so now i just need them to change when a option is chosen.
|
To answer your original question concisely: you'll have to use Javascript no matter how small as you'll need it to capture the drop-down event.
You can use a combination of PHP and Javascript by using AJAX to load the images using a back-end PHP script when needed - that is if you don't want the page to refresh inorder to load a new search-engine service. Then also use Javascript to change the search-engine URL target.
You can also use Javascript alone but you'll have to pre-load a lot of the involved stuff like Images to the browser which may take more time than just using AJAX to load them. Although you can just load maybe the most used search engine first then after the DOM is ready and the user can interact with the site, proceed to load the images and other needed stuff to the cache in the background.
I think using a combination of Javascript -AJAX - PHP is the best. It will make initial page load faster.