Problem Processing JavaScript Function

Discussion in 'JavaScript' started by WPPJames, Jun 21, 2010.

  1. #1
    I have a desktop software product (Rmsad.exe) that runs as a process in the background. Periodically, Rmsad.exe makes a call to a .php page (smfeed.php) on my server. One of the parameters it sends over is an URL to load in a DHTML window. Inside smfeed.php, I call a javascript function that displays the DHTML window:

    var googlewin=dhtmlwindow.open("googlebox", "iframe", '<?php echo $outurl2; ?>', "Title text here",
    "width=<?php echo $winwd; ?>px,height=<?php echo $winht; ?>px,resize=1,scrolling=1,center=1", "recal")
    Code (markup):
    This is a replacement for calling a basic javascript pop-up window. The script is a slightly expanded version of the one here:

    http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm

    Here's the layout of the smfeed.php page:

    <?php
    //Php code that exist here gets properly executed
    //
    //
    ?>
    
    <script type="text/javascript" src="deluxe-popup-window.js"></script>
    <script type="text/javascript">
    var googlewin=dhtmlwindow.open("googlebox", "iframe", '<?php echo $outurl2; ?>', "Title text here", "width=<?php echo $winwd; ?>px,height=<?php echo $winht; ?>px,resize=1,scrolling=1,center=1", "recal")
    </script>
    
    <?php
    //Php code that exist here gets properly executed
    //
    //
    ?>
    Code (markup):
    If you call the smfeed.php page directly, by manually entering it's URL into a browser address bar, the DHTML window script (dhtmlwindow.open) works fine. The DHTML window gets displayed. However, when smfeed.php is called from msad.exe, the window doesn't load at all. I tried replacing the dhtmlwindow.open statement with a very basic:

    <script type="text/javascript">
    window.open ('http://www.bing.com')
    </script>
    Code (markup):
    statement, just to test with a less complex javascript. It wouldn't load a window either. Again, both work if calling smfeed.php directly. There is php code before and after the javascript DHTML call. All the php code gets executed properly. So I know the entire smfeed.php page is getting processed.

    Any ideas why the javascript functions won't work when contacted by Rmsad.exe?
     
    WPPJames, Jun 21, 2010 IP
  2. flexdex

    flexdex Peon

    Messages:
    104
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Popup blocker?
     
    flexdex, Jun 22, 2010 IP
  3. hdewantara

    hdewantara Well-Known Member

    Messages:
    540
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #3
    I agree.
    dhtmlwindow.open() from dynamic-drive is either a <div> or <iframe>, not a stand-alone window.
     
    hdewantara, Jun 23, 2010 IP