javascript open window and a PHP script...

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default javascript open window and a PHP script...

    I have a link on a page...

    <a href="./admin/?listType=event_list&action=item_add" target=_blank>
    Add or Update Your Event
    </a>

    This open the PHP file just fine and passes the vars fine.

    But I need a new window to open via JavaScript. Why? Because I have a
    "RETURN" link on the opening page that closes the child page, and if this
    new window is not opened via JavaScript I get the "Close Window OK?" dialog.

    The only way to not get that annoying dialog is to have that child window
    opened via JavaScript.

    So I did this...

    <a
    href="javascript:window.open('./admin/?listType=event_list&action=item_add',
    '', '');">
    Add or Update Your Event
    </a>

    A child window opens, I get 1 error dialog and a Download dialog, and then
    the page opens fine.

    error:
    IE cannot download calendar.php from window.open('...
    IE was not able to open this Internet site. The requested site is
    either
    unavailable or cannot be found. Please try again.

    I hit OK and both the error dialog and the download page goes away.

    But the desired page is displayed in the child window!

    And the "RETURN" link closes the window without complaint!

    So, I've solved one issue to raise another.

    Anyone have any idea on this?

    Thanks

    Walter
    Jswalter Guest

  2. Similar Questions and Discussions

    1. open browser window javascript problem on dreamweaver2004 mx
      hi folks, i've linked a thumbnail to open a new browser window to show a larger image of the thumbnail. i've taken all the display options off...
    2. Open Window with Javascript from WebUserControl and return values
      hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on...
    3. Flash Page goes blank with Javascript:window.open() to HTML pages
      Hello, I just finished a site for my hobby/business of making blues guitar slides. Everything works great except that some browsers seem blank out...
    4. External Event + JavaScript/VBScript (open.window)
      Hi My Lingo script triggers with external event a VB / & Javascript in the Browser. In IE6 I can only open an URL within the same BrowserWindow...
    5. how to close a javascript window when asp script end
      i open the file download.asp from another main.asp page using window.open what the problem is when i clikc on the hyperlink it prompts me the ie...
  3. #2

    Default Re: [PHP] javascript open window and a PHP script...

    You should use:
    <a href="./admin/?listType=event_list&action=item_add" target="_blank"
    onclick="window.open(this.href,'', ''); return false;">Add or Update
    Your Event</a>

    Propably won't fix your problem but this will help javascript disabled
    browsers.

    jsWalter wrote:
    > I have a link on a page...
    >
    > <a href="./admin/?listType=event_list&action=item_add" target=_blank>
    > Add or Update Your Event
    > </a>
    >
    > This open the PHP file just fine and passes the vars fine.
    >
    > But I need a new window to open via JavaScript. Why? Because I have a
    > "RETURN" link on the opening page that closes the child page, and if this
    > new window is not opened via JavaScript I get the "Close Window OK?" dialog.
    >
    > The only way to not get that annoying dialog is to have that child window
    > opened via JavaScript.
    >
    > So I did this...
    >
    > <a
    > href="javascript:window.open('./admin/?listType=event_list&action=item_add',
    > '', '');">
    > Add or Update Your Event
    > </a>
    >
    > A child window opens, I get 1 error dialog and a Download dialog, and then
    > the page opens fine.
    >
    > error:
    > IE cannot download calendar.php from window.open('...
    > IE was not able to open this Internet site. The requested site is
    > either
    > unavailable or cannot be found. Please try again.
    >
    > I hit OK and both the error dialog and the download page goes away.
    >
    > But the desired page is displayed in the child window!
    >
    > And the "RETURN" link closes the window without complaint!
    >
    > So, I've solved one issue to raise another.
    >
    > Anyone have any idea on this?
    >
    > Thanks
    >
    > Walter
    >
    Marek Kilimajer Guest

  4. #3

    Default Re: [PHP] javascript open window and a PHP script...

    That's it!

    It works like a charm!

    Thank you very, very much!

    Walter
    Jswalter Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139