ok hier nun der CODE:
1.) view.php
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<div>
<script type="text/javascript">
function display_data(id,type,gal) {
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null) {
alert ("Your browser does not support AJAX!");
return;
}
var url= "http://domain/data.php";
url=url+"?type="+type+"&id="+id+"&gal="+gal;
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete") {
document.getElementById('data_preview_ajax').innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function GetXmlHttpObject() {
var xmlhttp=null;
try {
// Firefox, Opera 8.0+, Safari
xmlhttp=new XMLHttpRequest();
}
catch (e) {
// Internet Explorer
try {
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlhttp;
}
function func\_img\_prev(val) {
document.getElementById('img_preview_src').src=document.getElementById('img_prev_' + val).src;
document.getElementById('data_preview').innerHTML='<input type="hidden" name="pic_preview" value="' + val+ '">';
alert(document.getElementById("img_prev_" + val).src);
};
func\_img\_prev(1);
</script>
<div id="data_preview_ajax" style="height:110px; width:260px; overflow: auto; float: left"></div>
<div id="img_preview" style="margin-left:280px; height:100px; width:150px;"><img id="img_preview_src" src="../img/leistungen_no_prev_small.jpg" height="100"></div>
div id="data_preview"></div>
</div>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2.) data.php
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<div style="width:20px; height:95px; float:left; padding:5px 0 0 7px; margin:0 10px 0 0px; background-color:#c5d5fc"><b>01</b></div> <img id="img_prev_1" src="../images/galerie/gal_1/dat_46deefcb3ba260ea267ed404e0ec4d22.jpg" height="100" border="0" name="1" onclick="JavaScript:func_img_prev(1)"><p>