Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    May 2006
    Posts
    1,680
    Thanks
    28
    Thanked 4 Times in 4 Posts

    How do I get back to my parent window ?

    Hi all.

    My script launches a new window when the link is clicked.
    here is the link:

    <td class="ad_top_row"><a href='$Ad_detail' target='_blank' onclick=\"window.open (this.href, '$Ad_detail', 'height=800,width=960,scrollbars'); return false\" ><b>$event</b></a></td>

    In the new window is a form that then calls another script. But I want to run that script in the parent window. Anyone know how do I do that ?

    This is my form ( in the child window):


    <form name="detail" action = "do_it.php" method = 'POST'>
    <td style="vertical-align:center; height:30px;">
    <input type="hidden" name="ad_ref" value= "<?php echo "$ad_ref"; ?>" >
    <input type="hidden" name="section" value= "<?php echo "$section"; ?>" >
    <input type="hidden" name="x_detail" value= "<?php echo "$N_detail"; ?>" >
    <input type="hidden" name="x_yct" value= "<?php echo "$N_yct"; ?>" >
    <input type="hidden" name="x_yct_op" value= "<?php echo "$N_yct_op"; ?>" >
    <input type="TEXT" name="x_reason" value = "enter reason"
    size = '40' maxlength='200' />
    </td>
    </tr>
    <tr>
    <td>
    <input type="submit" class="btn_wide1" value = "Delete Advert and send Email."
    onMouseover="this.style.backgroundColor='#66ccff'"
    onMouseout="this.style.backgroundColor='#ccffff'" >
    </td>
    </form>

    Thanks very much for your help.

    dave
    Last edited by jeddi; 09-02-2006 at 10:18 AM.
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #2
    Senior Coder
    Join Date
    May 2006
    Posts
    1,680
    Thanks
    28
    Thanked 4 Times in 4 Posts
    Please help!

    I am really stuck with this one - Im just going in circles!
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #3
    Senior Coder
    Join Date
    May 2006
    Posts
    1,680
    Thanks
    28
    Thanked 4 Times in 4 Posts
    So no-one knows ?

    Ahh well - off to Webdeveloper forum then !

    I need to find the answer !!
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #4
    New Coder
    Join Date
    Aug 2006
    Location
    Illinois
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In the child window, you should be able to target the parent window (or even a form in the parent window) like this:

    Code:
    <script language="JavaScript">
    <!--
    	myParentFunction(window.opener.parentForm);
    -->
    </script>
    And then the myParentFunction could be contained in your parent window and would be called from the child window. Is that what you're needing?
    Sarah


  •  

    Posting Permissions

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