are you sure your form is called form1 ?
Rakesh Ayilliath
[EMAIL PROTECTED]
----- Original Message -----
From: "Nicola Taylor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 17, 2001 7:31 PM
Subject: javaScript frustration!
> In my page I am populating a text field via iterate tags, and checking for
> the relevant property ie:
>
> <logic:present name="myTermsTerm" property="termName" >
> <html:text NAME="myTermsTerm"
> property="termDetail" indexed="true"
> size="50"
> onmouseover="this.style.cursor='HAND'" ondblclick="myFunction(this);" />
> </logic:present>
>
> <logic:notPresent name="myTermsTerm" property="termName">
>
> </logic:notPresent>
>
> If the text field appears I want the user to be able to double click on it
> and, via a javascript function, carry the displayed data into in an html
> pop-up page and populate a text area. ie:
>
> function myFunction(test)
> {
>
>
> var s = test.value;
>
> var newwin = window.open("/LevelSeas/pages/nego/ViewDetails.html",
> "newwin","width=350 height=250,
> toolbar=yes,status=yes");
> newwin.document.form1.txtfield.value= s;
>
> }
>
> However this only works when I have not specified a property when checking
> for logic:present (and therefore the text field always appears). But as
> soon as I try to specify a property I get the following javascript error
> when doubleclicking :
>
> 'document.form1.txtfield' is not an object
>
> CAN ANYONE EXPLAIN THIS PLEASE ?????
>
> Cheers
> Nicola
>
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
>
> www.mimesweeper.com
> **********************************************************************
>