#1
  1. No Profile Picture
    Dave Bryant
    Guest
    Devshed Newbie (0 - 499 posts)
    Is there a way to use the header funtion to call another page with the direction statement that pops up in a new window without having to embed Javascript and leaves the old page untouched?
    If NOT:
    Could I get the redirection to the new page.php and have the newpage.php call Javascript without making the old page change locations?
    Help...pulling my hair out

    ------------------
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    i think with header() it is difficult to do that in php.

    but if you can include "<base target="_blank">" tag in side the <head> tags in your html.it will open the new pages only in a new window.

    here is an example:

    <html>
    <head>

    <SCRIPT LAGUAGE="JavaScript">
    function new_window(){
    window.open("newpage.php",300,300);
    }
    </SCRIPT>
    <base target="_blank">
    </head>

    <body onLoad="new_window();">

    <h1>This is just a test</h1>
    </body>
    </html>


    play around this base tag .i think you can do it easily.

    Good Luck!!!




    ------------------
    SR -
    shiju.dreamcenter.net

    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Pennsylvania, USA
    Posts
    37
    Rep Power
    15
    I have a similar issue that I don't think can be resolved using the html code that was presented here.
    Basically, I have a cgi script that is executed to "login" a user (update the database). It produces no output other than autosubmitting a hidden form with the user ID to a .php3 script. This .php3 script's only purpose is to set a cookie, call itself back to verify the cookie was set, and if set - it redirects to another URL. The .php3 script has no html, just php3 code [and uses header(Location: URL ) for the redirect]. We want this to all happen behind the scenes without the user seeing any additional screens until they get to the final URL destination. This has worked fine with the following exception:
    The client wants the final URL destination to appear in a new window with specific size requirements.
    Any suggestions?

    Sharon

Similar Threads

  1. javascript popup window
    By petehayes in forum JavaScript Development
    Replies: 5
    Last Post: February 11th, 2004, 05:34 AM
  2. calling a variable in the html with javascript
    By grungefade in forum JavaScript Development
    Replies: 4
    Last Post: February 10th, 2004, 04:34 PM
  3. Calling a JavaScript function from VBScript
    By starbar in forum JavaScript Development
    Replies: 3
    Last Post: February 7th, 2004, 04:31 PM
  4. Setting window focus with javascript
    By jayhay in forum JavaScript Development
    Replies: 0
    Last Post: January 28th, 2004, 05:28 AM
  5. more help needed in MFC
    By carol2003 in forum C Programming
    Replies: 8
    Last Post: December 19th, 2003, 01:59 AM

IMN logo majestic logo spyfu logo threadwatch logo seochat tools logo