pass the two textbox values in the new page

C

colleen1980

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>
 
L

-Lost

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

<snip>

Assuming I understand you correctly:

"How do I POST a form to a new window?"
http://www.jibbering.com/faq/#FAQ4_37

-Lost
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top