window.open with php header

Discussion in 'Javascript' started by Josh Burkard, Oct 19, 2006.

  1. Josh Burkard

    Josh Burkard Guest

    Hello

    i want to create a link to a php script witch contains special headers.

    if i create the link like below, all is ok.
    <A HREF="script.php?id=1">

    If i create the link with JavaScript like this:
    window.open("script.php?id=1");
    i receive an error-message like script.php can't be downloaded.

    What can i do?

    Best regards
    Josh
    Josh Burkard, Oct 19, 2006
    #1
    1. Advertising

  2. Josh Burkard

    ASM Guest

    Josh Burkard a écrit :
    > If i create the link with JavaScript like this:
    > window.open("script.php?id=1");
    > i receive an error-message like script.php can't be downloaded.


    Really :

    <a href="#" onclick="window.open('script.php?id=1');return false;">
    my php
    </a>

    doesn't work ?

    your browser accepts popups ?
    ASM, Oct 19, 2006
    #2
    1. Advertising

  3. Josh Burkard

    uoL Guest

    hello,

    i think u r missing some parameters I would do

    window.open ("location","name","parameters");

    parameters for example: "width=100,height=100" etc

    hope that help,
    bye
    uoL, Oct 19, 2006
    #3
  4. Josh Burkard

    Josh Burkard Guest

    This wasn't the solution. i tried this before.

    i've found now the solution:

    window.location.href = 'script.php?id=1';

    Thanks and Best regards
    Josh


    "uoL" <> schrieb im Newsbeitrag
    news:...
    > hello,
    >
    > i think u r missing some parameters I would do
    >
    > window.open ("location","name","parameters");
    >
    > parameters for example: "width=100,height=100" etc
    >
    > hope that help,
    > bye
    >
    Josh Burkard, Oct 19, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mlt
    Replies:
    2
    Views:
    819
    Jean-Marc Bourguet
    Jan 31, 2009
  2. Rajive Narain
    Replies:
    0
    Views:
    1,575
    Rajive Narain
    Sep 18, 2009
  3. PC HUA
    Replies:
    2
    Views:
    393
    PC HUA
    May 19, 2004
  4. Joker7

    window.open in a php script

    Joker7, Jan 23, 2005, in forum: Javascript
    Replies:
    5
    Views:
    98
    Hywel Jenkins
    Jan 23, 2005
  5. 2291980
    Replies:
    2
    Views:
    78
    pcx99
    Feb 19, 2007
Loading...

Share This Page