<script language="JavaScript"><!--
function updateOpener() {
opener.document.forms[0].output.value = document.forms[0].input.value;
opener.document.forms[0].submit;
window.close();
}
//--></script>
I might be wrong but at first glance i believe you need '()' after submit
<script language="JavaScript">
<!--
function updateOpener() {
opener.document.forms[0].output.value = document.forms[0].input.value;
opener.document.forms[0].submit; <---- right here
window.close();
}
//-->
</script>
chris.alvarado
cold.fusion - developer
[phone] 512.794.6563
[email] [EMAIL PROTECTED]
[web] http://www.tmanage.com
Privileged/Confidential Information may be contained in this message. It is
not for use or disclosure outside TManage without a written proprietary
agreement. If you are not the addressee indicated in this message, or agent
responsible for delivery, you may not copy or deliver this message to
anyone. Please notify the sender as soon as possible and immediately
destroy this message and its attachments entirely.
-----Original Message-----
From: Gene Kraybill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 05, 2000 12:03 PM
To: CF-Talk
Subject: OT: Javascript problem
Looking for a bit of help with some Javascript I want to use in a CF app.
I want to be able to open a popup window (TEST_POPUP.CFM), enter a value in
that
window, and then submit the popup window so it changes a field in the
original page
(TEST_MAIN.CFM) to the popup value and automatically submits the original
page to
its action script (TEST_ACTION.CFM). I need to show the action page's
results in the
original window and close the popup window.
With these 3 little test scripts, the value from the popup window appears in
the input
field of the original page, but the original page doesn't get submitted to
the action
page. What am I missing?
Gene Kraybill
==============================================================
TEST_MAIN.CFM:
<script language="JavaScript"><!--
function windowOpen() {
var
myWindow=window.open('test_popup.cfm','windowRef','width=200,height=200');
if (!myWindow.opener) myWindow.opener = self;
}
windowOpen();
//--></script>
<form METHOD="Post" action="test_action.cfm">
<input type="text" value="" name="output">
</form>
TEST_POPUP.CFM
<script language="JavaScript"><!--
function updateOpener() {
opener.document.forms[0].output.value = document.forms[0].input.value;
opener.document.forms[0].submit;
window.close();
}
//--></script>
<form onSubmit="updateOpener()">
<input type="text" value="" name="input">
<input type="submit">
</form>
TEST_ACTION.CFM
<html>
<body>
this is the page that processes the results from the main page.
<CFOUTPUT>output is: #form.output#</CFOUTPUT>
</body>
</html>
---------------------------------
Gene Kraybill
LPW & Associates LLC
www.lpw.net
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists