dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: How do I get rid of URL at top of new window in IE8?

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Posts
    1

    Question How do I get rid of URL at top of new window in IE8?

    Hello,

    I have a photo gallery website that has pages of thumbnails, which display a full-size image using a "window.open" command. There are links to exposure information beneath the photo. Everything used to fit in a 700x800 window. With the advent of IE8, however, a URL bar appears below the title bar of the window, and a status bar appears at the bottom. With the addition of those two bars, the links are pushed off the bottom of the window. I prefer not to have to create new, smaller images for the entire site. I'm familiar with the commands to allow or prevent title bars, scroll bars, etc. in frames, but I cannot find out how to prevent these when using the window.open command. If someone can provide me the information to disable these items, I would be most appreciative. You can see what I'm describing at www.starrynightimages.com.

    Thanks so much,

    Arnie

  2. #2
    Join Date
    Feb 2012
    Posts
    4
    Maybe you can wrap all your content in a div, and set the size of everything in % or em, but I see your dilemma.

    You would have to set one html document for your images, and store a global variable for your images. You can swap the image that appears in the one window that matches the variable.

    Also, ignore the fact that you can't set the properties with window.open, that has to be set within the html where you have your images appearing.

    Set your sizes in % or em, if you want the content to match the window, wrap it in a div, and set an id property tag for that div, overflow everything inside, and make the div match the height and width of your window using the current window size.

    Say you make a div with the id "scene" as an example:

    window.onresize = function () {
    document.getElementById("scene").style.height = self.height;
    document.getElementById("scene").style.width = self.width;
    }

    Everything within the div should overflow or be 100% of the div's size.

    Also, for image-swapping, try adding this:

    var imageSwap = new image();

    imageSwap[0] = "image1.jpg";
    imageSwap[1] = "image2.jpg";

    Your image tag will look like this with preset values:
    <img name="swap" src="image1.jpg" alt="" onload="imageSwapping()" />

    say your global variable was set to 0 or 1 in the gallery where you use the onclick event-handler to set your variable called "myVar", then you use that:
    function imageSwapping() {
    document.swap.src = imageSwap[myVar];

    if (myVar == 0)
    document.swap.alt = "text you will set for image index 0";
    if (myVar == 1)
    document.swap.alt = "text you will set for image index 1";
    }


    These are some tips. I could test to see how to set up the div for you, but I'm doing some work myself.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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



Recent Articles