pass the two textbox values in the new page

Discussion in 'Javascript' started by colleen1980@gmail.com, Mar 27, 2007.

  1. Guest

    Hi: Can any one please tell me that how to i pass the two textbox
    values in the new page. If i use the form action in the popup window
    page then the new page is open in the same popup window as i need to
    open the new page in the main page window with passing the two textbox
    parameters into the new page. Program opens the new page but dont know
    how to pass the two textboxes values into the new page name
    deceasedToday.asp Needs help in JavaScript

    POPUP WINDOW PAGE FROM WHERE I AM TRYING TO PASS THE TWO TEXTBOXES
    INTO NEW PAGE
    <html lang="en">
    <head>
    <script type="text/javascript">
    function upParent() {
    // var url = document.getElementById('cpList').value;
    var url = 'deceasedToday.asp'
    window.opener.location.href = url;
    window.close();
    }
    </script>
    <title>Pop Up Date</title>
    </head>
    <body>
    <%
    TodaysDate=Date
    %>
    <form name='Frm_DeceasedDate' method='Post'>
    <table border='0' align='center'>
    <tr><td>Enter Starting Date</td><td><input type='Text'
    name='StartingDate' value="<%=TodaysDate%>"></td></tr>
    <tr><td>Enter Ending Date</td><td><input type='Text' name='EndingDate'
    value="<%=TodaysDate%>"></td></tr>
    <tr><td><input type='button' value='Continue' name='selectAll'
    onclick='upParent();'></td></tr>
    </table>
    </form>
    </body>

    </html>

    MAIN WINDOW PAGE FROM WHERE THE POPUP OPEN. I AM TRYING TO PASS THE
    TWO TEXBOXES BUT IN THE NEW PAGE NAME deceasedToday.asp NOT IN THE
    SAME PAGE
    <html>
    <head>

    <body>
    <h2><center>DECEASED DATA SEARCH</center></h2>
    <br><br>
    <form name='deceasedsocial' id='deceasedsocial' method='POST'
    onsubmit="return selectAllOptions()">
    <table border='0' align='center'>

    <tr>
    <td valign="bottom">Enter Social Security Number</td></td><td><input
    type='text' name='ssn' id='ssn'>&nbsp&nbsp<select id="lstSSN"
    name="lstSSN"

    multiple></select></td></tr>
    <tr><td><input type="button" value="Add" onclick="return
    loadList();"></select>
    <input type="button" value="Delete" onclick="return deleteIt();"></
    select>
    <input type="submit" value="Process"
    onClick="this.form.action='ProcessDeceased.asp'";>

    </td></tr>
    <tr><td><input type="submit" value='Todays Deceased'
    onclick='openPopup();'>
    </td></tr>

    </table>
    </form>
    <script language="JavaScript">
    var childPopup = null;
    var frm = document["deceasedsocial"];

    function openPopup() {
    if (childPopup != null) {
    if (childPopup.closed == false)
    childPopup.close()
    }
    childPopup =
    window.open('DeceasedDate.asp','child','width=400,height=200,top=100,left=100,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no,directories=no,fullscreen=no');
    return childPopup;
    }

    function changeLocation(pURL) {
    childPopup.close();
    document.location = pURL;
    }

    function loadList() {
    intCount = frm.lstSSN.length;
    frm.lstSSN.options[intCount] = new
    Option(frm.ssn.value,frm.ssn.value);

    // Get textbox, clear it then focus onto it.
    var textbox = document.getElementById('ssn');
    textbox.text = "";
    textbox.focus();
    document.getElementById('ssn').value=""
    document.getElementById('ssn').focus();
    return true;
    }

    function deleteIt()
    {
    for (var i=(frm.lstSSN.options.length-1); i>=0; i--)
    {
    var o=frm.lstSSN.options;
    if (o.selected) {
    frm.lstSSN.options = null;
    document.getElementById('ssn').focus();
    // return true;
    }
    }
    return true;
    }

    function selectAllOptions() {
    var ref = document.getElementById('lstSSN');
    for(i=0; i<ref.options.length; i++)
    ref.options.selected = true;
    return true;
    }

    </script>
    </body>
    , Mar 27, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marco Antonio Montalvo Durán
    Replies:
    2
    Views:
    4,094
    Matt Morris
    Jan 23, 2004
  2. AGSHAR
    Replies:
    1
    Views:
    591
    AGSHAR
    May 31, 2008
  3. agb

    writing two textbox's text in one textbox

    agb, Aug 26, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    166
    Ken Cox [Microsoft MVP]
    Aug 27, 2003
  4. Steve
    Replies:
    4
    Views:
    208
    Steve
    Feb 7, 2006
  5. Replies:
    1
    Views:
    535
    -Lost
    Mar 27, 2007
Loading...

Share This Page