...

View Full Version : Session Lost after loading a image from unc virtual path



MGrassman
09-06-2005, 07: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

MGrassman
09-06-2005, 07:57 PM
I have just placed the image in a the root image images folder and I got the same problem. So I think it's something to do with the javascript. Now I'm really confused.

Please Help :cool:

MGrassman
09-06-2005, 08:49 PM
On my mouseout event I sent an empty string as the source of the new image which would be out of the local web. So I switched the empty string with a spacer image and everything works fine now.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum