MGrassman
09-06-2005, 06:40 PM
I have a image management page written that allows users to preview the image when the user mouseovers a preview link. The code to handle all this is below. The folder uploadedThumbs is a virtual directory that points to a unc path on a different server. Everything works fine with the preview but when I go to another page all my session variables are gone.
Does linking an image to a different server cause sessions to end?
root web site
http://domain.com/web/
(name changed for security)
Onmouseover event
I have also tried using images/uploadedThumbs/_67_Tyler_House_Rendering830200512731.jpg in the preview function but that produced the same result.
<a href="#" onmouseover="showPreview('http://domain.com/web/images/uploadedThumbs/_67_Tyler_House_Rendering830200512731.jpg', true)" onmouseout="showPreview('', false)">Preview</a>
Image Tag
<img id="picturebox" src="images/spacer.gif" width="250" style="position:absolute; padding:20px; border:2px #000000 solid;display:none;background-color:#f0f0f0;" />
Javascript function
function showPreview(imgSrc, bValue, e){
var img = document.getElementById('picturebox')
img.style.left = window.event.x + 40;
img.style.top = window.event.y - 20;
img.src = imgSrc;
if(bValue) {
img.style.display = "block";
} else {
img.style.display = "none";
}
}
Thanks for you time and if you need any other code or examples let me know,
Michael
Does linking an image to a different server cause sessions to end?
root web site
http://domain.com/web/
(name changed for security)
Onmouseover event
I have also tried using images/uploadedThumbs/_67_Tyler_House_Rendering830200512731.jpg in the preview function but that produced the same result.
<a href="#" onmouseover="showPreview('http://domain.com/web/images/uploadedThumbs/_67_Tyler_House_Rendering830200512731.jpg', true)" onmouseout="showPreview('', false)">Preview</a>
Image Tag
<img id="picturebox" src="images/spacer.gif" width="250" style="position:absolute; padding:20px; border:2px #000000 solid;display:none;background-color:#f0f0f0;" />
Javascript function
function showPreview(imgSrc, bValue, e){
var img = document.getElementById('picturebox')
img.style.left = window.event.x + 40;
img.style.top = window.event.y - 20;
img.src = imgSrc;
if(bValue) {
img.style.display = "block";
} else {
img.style.display = "none";
}
}
Thanks for you time and if you need any other code or examples let me know,
Michael