Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Session Lost after loading a image from unc virtual path

    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.
    Code:
    <a href="#" onmouseover="showPreview('http://domain.com/web/images/uploadedThumbs/_67_Tyler_House_Rendering830200512731.jpg', true)" onmouseout="showPreview('', false)">Preview</a>
    Image Tag
    Code:
    <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
    Code:
        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

  • #2
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #3
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Never mind Error on My part

    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •