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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JavaScript beginner, please help!

    I want my index page to automatically open in a fixed sixe (width=750, height=800, without scrollbars, menubar, or status bar) when the visitor types the URL of my site. Can someone suggest a simple code for this?

    Thanks

  • #2
    Regular Coder
    Join Date
    Feb 2005
    Posts
    525
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <body onload="window.open('pageURL','windowName','scrollbars=no,height=X,width=X,location=no,status=no');" >
    Single Paradox
    My Site (Under construction)

    Not too bad for a 15 year old

  • #3
    Regular Coder
    Join Date
    May 2005
    Location
    Michigan, USA
    Posts
    566
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ssingru
    I want my index page to automatically open in a fixed sixe (width=750, height=800, without scrollbars, menubar, or status bar) when the visitor types the URL of my site. Can someone suggest a simple code for this?
    Thanks
    No you really don't. People will not view your site. And most off alot of people will block it because of built in pop-up blockers.
    Note: I do not test code. I just write it off the top of my head. There might be bugs in it! But if any thing I gave you the overall theory of what you need to accomplish. Also there are plenty of other ways to accomplish this same thing. I just gave one example of it. Other ways might be faster and more efficient.

  • #4
    Regular Coder
    Join Date
    Feb 2005
    Posts
    525
    Thanks
    0
    Thanked 0 Times in 0 Posts
    True, I should have said that, if you don't care about if people are leaving your site, have a link that opens a pop up because pop up blockers don't stop that. Most people will find that annoying but do as you wish.
    Single Paradox
    My Site (Under construction)

    Not too bad for a 15 year old

  • #5
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    One more question

    Thanks for your advice, the pop-up blocker issue had not occured to me. Can someone please post a script which will enable me to link from one page to another, where the linked window is of a specific size with no scroll or menu bars?

    Thanks again.

  • #6
    Regular Coder martin_narg's Avatar
    Join Date
    Jul 2002
    Location
    Chamonix, France
    Posts
    600
    Thanks
    1
    Thanked 3 Times in 3 Posts
    have a look at window.open

    But realistically, try and use css for layout/etc - much better all round.

    Hope this helps

    m_n
    "Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
    and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
    -Tommy Cooper


  •  

    Posting Permissions

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