struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rakesh" <ayilli...@india.com>
Subject Re: javaScript frustration!
Date Fri, 17 Aug 2001 14:59:49 GMT
are you sure your form is called form1 ?


 Rakesh Ayilliath

ayilliath@india.com


----- Original Message -----
From: "Nicola Taylor" <nicola.taylor@levelseas.com>
To: <struts-user@jakarta.apache.org>
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">
>                             &nbsp;
> </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
> **********************************************************************
>

Mime
View raw message