51 users online (0 members and 51 guests)  


  Results 1 to 3 of 3

Related

  1. Passing value from parent window to child window    Forum: Javascript Forum
    Replies: 0
  2. document.getElementById    Forum: Javascript Forum
    Replies: 0
  3. document.getElementByID    Forum: Javascript Forum
    Replies: 6
  4. Replies: 1
  1. #1
    arose's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2003
    Posts
    4

    AutoOpen Document in new Window.

    Hello everyone!

    This ones got me stunned, although I'm almost sure, that the solution must be quite simple.

    I know how to open a doc in a new window by clicking a link.

    <a onClick="window.open'banner_help.php', 'BannerHelp','width=400,height=300')">[&nbsp;...help&nbsp;]</a>

    What I want to do is to have a php 'echo();' open a doc in a new window without having to click anything.

    Usage: at the end of a php file there is a if...else junction. I want the 'if' clause to to echo a command that will cause a certain document to open in a new window without having to click a link first.

    Your help is greatly appreciated,

    a.rose

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hello there.

    Have your php echoi out javascript code like this -

    Code:
    <script language="JavaScript">
    window.open('banner_help.php', 'BannerHelp','width=400,height=300');
    </script>
    And that should do it.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    arose's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2003
    Posts
    4
    Ouch. That simple? .....where's my duncecap?!? If you ever plan on creating a 'dork of the day' award - I hereby volunteer.

    Thanx for the Help!



Tags for this Thread