SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Addict djh's Avatar
    Join Date
    Apr 2000
    Location
    Long Beach, CA
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Onload hide toolbar, addressbar

    Please help.

    What's the javascript to change the window to hide the location bar, toolbar, etc onLoad?

    I know this must be simple, but I can't find the answer anywhere.

    ??

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    <script language="Javascript"
    var 
    NewWindow window.open("url.htm","winname","width=200,height=150,statusbar=0,menubar=0,toolbar=1"); 
    NewWindow.focus(); 
    </script> 

  3. #3
    SitePoint Addict djh's Avatar
    Join Date
    Apr 2000
    Location
    Long Beach, CA
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think that'll work.

    I can't open a new window. It needs to be the window that is already open.

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    post what you've done so far, so i know what your talking about as i dont get what you're on about, shouldn't be hard todo, but thats the way to do it any way.

  5. #5
    SitePoint Addict djh's Avatar
    Join Date
    Apr 2000
    Location
    Long Beach, CA
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure, here it is:

    Code:
    <script language="JavaScript">
    <!--
    function resizeWin()
    {
    window.resizeTo(225,600);
    }
    //-->
    </script>
    </head>
    <body bgcolor="#FFFFFF" text="#000000" onload="resizeWin()">
    </body>
    I just want the javascript to hide the address bar and stuff to go in the function...

  6. #6
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm afraid what you are asking for cannot be done - that is intentionally not possible because of the possible malicious uses (mainly just annoyance). That's why you can only alter new windows spawned by the current window.


    M@rco

  7. #7
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    I didn't think it was possible, but wasn't sure thanks for letting me know tho

  8. #8
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Strangely common request though. You're the tenth (or so) person I've come across this month that wanted to be able to do this! It cropped up on the ASPClient discussion list AGAIN yesterday - see here for most of the thread:

    http://www.aspfriends.com/search/MSG.ASP?msgid=605415

    You might find some of the responses helpful!


    M@rco

  9. #9
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    best way to deal with this is to open your site and make a popup display your site like most flash sites do


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
  •