Popup Window From Form

Discussion in 'JavaScript' started by diarratech, Feb 4, 2008.

  1. #1
    Hi, I have a problem calling back my popup window when I minimized it
    Here is the script
    <SCRIPT TYPE="text/javascript">
    <!--
    function popupform(myform, windowname)
    {
    if (! window.focus)return true;
    window.open('', windowname, 'height=(500,width=500,scrollbars=yes');
    myform.target=windowname;
    return true;
    }
    //-->
    </SCRIPT>

    Here is the form
    <FORM METHOD=POST
    ACTION="../reponse.asp"
    onSubmit="popupform(this, 'pop')">
    name: <input name ="name">
    <input type = SUBMIT Value="ok">
    </form>

    Thanks
     
    diarratech, Feb 4, 2008 IP
  2. locdev

    locdev Active Member

    Messages:
    171
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #2
    not 100% sure but try this code:
    
    <SCRIPT TYPE="text/javascript">
    <!--
    function popupform(myform, windowname)
    {
    if (!window.focus)return true;
    w=window.open('', windowname, 'height=(500,width=500,scrollbars=yes');
    w.focus();
    myform.target=windowname;
    return true;
    }
    //-->
    </SCRIPT>
    
    Code (markup):
     
    locdev, Feb 5, 2008 IP