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 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    is it possible for Javascript to popup a subform and pass thevalues back...

    hi,
    I am in my first project and need help with the following.

    I want a form for taking five values and if there is second reading I want to provide a link that should be doing as below:

    1.insert a new row as shown in load page
    2.this option should be able to repeat 8 times.

    Or,
    on clicking the link for more reading it should popup a window with the filds for entry and it should pass that values to variables in the parent page...

    I am not that expert in Javascript and it would of great help if somebody could share with me a sample example...I have got a sample one but do not know how to assign the popup varibles to parent script.

    ------------------------------------------------
    <SCRIPT LANGUAGE=JAVASCRIPT><!--


    function windowOpen() {
    var myWindow=window.open('popup.html','windowRef','width=200,height=200');
    myWindow.location.href = 'popup.html';
    if (!myWindow.opener)
    myWindow.opener = self;
    }
    windowOpen();
    ----------------------------------------------
    <SCRIPT LANGUAGE=JAVASCRIPT><!--


    function returnDetails() {
    //the below line confuses me alot.....

    opener.location.href = 'whatever.cgi?login=' + escape(document.myForm.loginname.value) + '&password=' + escape(document.myForm.loginpassword.value);
    setTimeout('window.close()',500);
    }
    //--></SCRIPT>
    <FORM NAME="myForm">
    Name: <INPUT TYPE="TEXT" NAME="loginname">
    Password: <INPUT TYPE="PASSWORD" NAME="loginpassword">
    <INPUT TYPE="BUTTON" VALUE="ENTER" onClick="returnDetails()">
    </FORM>
    ----------------------------
    thankin you
    Harish Balakrishnan Marar

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,505
    Thanks
    3
    Thanked 501 Times in 488 Posts


  •  

    Posting Permissions

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