View Full Version : Ajax Page Fetcher Question
01-13-2008, 07:04 AM
I've got an image that changes whenever you select a different item from a select box. When I use the Ajax Page Fetcher it shows the default image and not the image that was selected from the select box.
Is there any way to edit the code to show the image selected? Here's the url for what I'm doing:http://har**villedesign.com/har**villedesign/gil_u_d.html (http://www.har**villedesign.com/har**villedesign/gil_u_d.html) (delete the ** in the url. I only have the first few clickable at this point.
Any help is appreciated!
01-13-2008, 02:48 PM
dont use AJAX for that have some thing like this
document.getelementbyid('image').src = img;
Your Image code
<img src='' id="image" onload="images('*default image*');" />
Then have onclick or onhover affect on the trigers that run image('*image Address*');
I hope this works for you if you are wanting it to get the images addresses from a DB have some thing like this
$query = mysql_query('SELECT (img, ID) FROM `Images`)
while($row = mysql_fetch_array($query))
echo 'var image['.$row['ID'].'] = "'.$row['img'].'";
I hope this helps u and the last code bit is PHP
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.