Results 1 to 3 of 3

Thread: Open Picture Window Fever Help

  1. #1
    Join Date
    Feb 2005
    Posts
    81
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default Open Picture Window Fever Help

    I need to include a path for my picture as well as the VBscript from the database

    <script language="JavaScript" type="text/JavaScript">
    <!--
    function openPictureWindow_Fever(imageName,imageWidth,image Height,alt,posLeft,posTop) {
    newWindow = window.open("","newWindow","width="+imageWidth+", height="+imageHeight+",left="+posLeft+",top="+posT op);
    newWindow.document.open();
    newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
    newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>');
    newWindow.document.write('</body></html>');
    newWindow.document.close();
    newWindow.focus();
    }
    //-->
    </script>


    +ImageName+ = picture.jpg

    I need to include \upload\images before it

    I have tried amending it into the js but it keeps giving errors

    Thanks

  2. #2
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    Use the following:

    <script language="JavaScript" type="text/JavaScript">
    <!--
    function openPictureWindow_Fever(imageName,imageWidth,image Height,alt,posLeft,posTop) {
    newWindow = window.open("","newWindow","width="+imageWidth+", height="+imageHeight+",left="+posLeft+",top="+posT op);
    newWindow.document.open();
    newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
    var imgName = "\\upload\\images" + imageName;
    newWindow.document.write('<img src='+imgName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>');

    newWindow.document.write('</body></html>');
    newWindow.document.close();
    newWindow.focus();
    }
    //-->
    </script>

  3. #3
    Join Date
    Feb 2005
    Posts
    81
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Thanks mate works a treat!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Awful open-source .Net software
    By cswd in forum ASP.NET
    Replies: 12
    Last Post: 14th December 2005, 03:59 PM

Bookmarks

Posting Permissions

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