PDA

View Full Version : Problem combine text box name??? HELP


buckbeak
10-03-2002, 11:05 AM
Is this js script correct???

var form1 = "";
form1 = "window.opener.document." + "#cal#";
form1.DateField.value = DateToShow;
window.close();


Why is this script not working?
it seems that window.opener.document.gr_part.DateField does not exist??

I pass the value using cf(#cal#)... gr_part is my form name.

glenngv
10-03-2002, 12:00 PM
dont know the syntax for cold fusion (?). is it cf(#cal#) or just #cal#?

var form1;
form1 = eval("window.opener.document." + "#cal#");
//or
//form1 = eval("window.opener.document." + "cf(#cal#)");

if (form1) form1.DateField.value = DateToShow;
window.close();

or why not just:

form1 = window.opener.document.forms["#cal#"];
//or
//form1 = window.opener.document.forms["cf(#cal#)"];

buckbeak
10-04-2002, 02:37 AM
Thanks glenngv! It's works

it just #cal#

Thanks again!