easiest jQuery image preview (on select)
problem space:
You have a select list of images (as urls, or can access the url through an
id, or some such way). When you select a new image you want to see the image
'previewed'.
<script type="text/javascript">
jQuery(document).ready(function() {
$('#images_link').change(function(){
var img_url = $('#images_link :selected').text();
$('#preview_image').html('<p><img src="'+img_url+'"/></p>');
$('#preview_image').dialog();
});
});
</script>
<body>
<label for="images_link">Image</label><br />
<select id="images_link" name="images[link]">
<option value=""></option>
<option value="1">http://example.com/images/foo.png</option>
<option value="2">http://example.com/images/bar.png</option>
<option value="3">http://example.com/images/baz.png</option>
</select>
<div id='preview_image'><p></p></div>
</body>
