Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-06-2005, 06:40 PM   PM User | #1
MGrassman
New to the CF scene

 
Join Date: Sep 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
MGrassman is an unknown quantity at this point
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
MGrassman is offline   Reply With Quote
Old 09-06-2005, 06:57 PM   PM User | #2
MGrassman
New to the CF scene

 
Join Date: Sep 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
MGrassman is an unknown quantity at this point
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
MGrassman is offline   Reply With Quote
Old 09-06-2005, 07:49 PM   PM User | #3
MGrassman
New to the CF scene

 
Join Date: Sep 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
MGrassman is an unknown quantity at this point
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.
MGrassman is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:05 AM.


Advertisement
Log in to turn off these ads.