Rashar
04-20-2004, 08:31 AM
Hi, not sure if my issue is with the javascript but i'll ask...
I'm trying to populate notes from one text area to another. I have it working from the popup window where if notes are entered, and update is selected, it populates on my other form...but the other way around does not work...any help would be greatly appreciated. Here is the code in it's entirety.
**************************************************
<!-- Notes section -->
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>test form</title>
<script language="JavaScript">
function transfer(str){
if (opener && !opener.closed){
opener.document.FrontPage_Form2.Notes.value=str;
}
}
</script>
</head>
<!--#include file="../_private/config.inc"-->
<body bgcolor="#C0C0C0">
<h2 align="center">Populate Notes</h2>
<form method="POST" action="../test/notes.asp" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
<br>
<div align="center">
<center>
<TABLE border="0" cellspacing="0" width="817" style="border-collapse: collapse" cellpadding="0">
<tr>
<td width="802" height="21" valign="top">
<p align="right"> <p align="left">
<font color="#FF0000">*</font> Problem Notes:
<a href="#null" onclick="popit=open('popup_notes.asp','pop','top=280,left=390,width=750,height=600,scrollbars=yes,resizable=y es' ); popit.focus(); transfer(document.FrontPage_Form1.Notes.value);">
<img border="0" src="../remedy/diary.jpg" width="25" height="22" alt="Diary Editor"></a>
<br>
<!--webbot bot="Validation" s-display-name="Notes" b-value-required="TRUE" i-maximum-length="4000" --><textarea rows="8" name="Notes" cols="53"></textarea></td>
</tr>
</table>
</center>
</div>
</hr>
<p align="center"><input type="submit" value="Save" name="Submit"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
**************************************************
<!-- PopUp Window section -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<script language="javascript">
function transfer(str){
if (opener && !opener.closed){
opener.document.FrontPage_Form1.Notes.value=str;
}
}
</script>
<body onLOAD="transfer(document.FrontPage_Form2.Notes.value)" bgcolor="#C0C0C0">
<form name="FrontPage_Form2">
<P align="center">
<textarea rows="31" name="Notes" cols="81"></textarea>
<BR>
<P align="center">
<input type="button" value="Update" onclick="transfer(document.FrontPage_Form2.Notes.value); window.close()">
</form>
</body>
</html>
I'm trying to populate notes from one text area to another. I have it working from the popup window where if notes are entered, and update is selected, it populates on my other form...but the other way around does not work...any help would be greatly appreciated. Here is the code in it's entirety.
**************************************************
<!-- Notes section -->
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>test form</title>
<script language="JavaScript">
function transfer(str){
if (opener && !opener.closed){
opener.document.FrontPage_Form2.Notes.value=str;
}
}
</script>
</head>
<!--#include file="../_private/config.inc"-->
<body bgcolor="#C0C0C0">
<h2 align="center">Populate Notes</h2>
<form method="POST" action="../test/notes.asp" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
<br>
<div align="center">
<center>
<TABLE border="0" cellspacing="0" width="817" style="border-collapse: collapse" cellpadding="0">
<tr>
<td width="802" height="21" valign="top">
<p align="right"> <p align="left">
<font color="#FF0000">*</font> Problem Notes:
<a href="#null" onclick="popit=open('popup_notes.asp','pop','top=280,left=390,width=750,height=600,scrollbars=yes,resizable=y es' ); popit.focus(); transfer(document.FrontPage_Form1.Notes.value);">
<img border="0" src="../remedy/diary.jpg" width="25" height="22" alt="Diary Editor"></a>
<br>
<!--webbot bot="Validation" s-display-name="Notes" b-value-required="TRUE" i-maximum-length="4000" --><textarea rows="8" name="Notes" cols="53"></textarea></td>
</tr>
</table>
</center>
</div>
</hr>
<p align="center"><input type="submit" value="Save" name="Submit"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
**************************************************
<!-- PopUp Window section -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<script language="javascript">
function transfer(str){
if (opener && !opener.closed){
opener.document.FrontPage_Form1.Notes.value=str;
}
}
</script>
<body onLOAD="transfer(document.FrontPage_Form2.Notes.value)" bgcolor="#C0C0C0">
<form name="FrontPage_Form2">
<P align="center">
<textarea rows="31" name="Notes" cols="81"></textarea>
<BR>
<P align="center">
<input type="button" value="Update" onclick="transfer(document.FrontPage_Form2.Notes.value); window.close()">
</form>
</body>
</html>