Sorry, didn't see your post until now.  hmmmm...I think I goofed with using the 'this' 
keyword, for starters.  It should be 'self'.  Actually, you can probably omit it 
entirely.  If this isn't the cause of your error, I'm not really sure what's going 
on...I'm no JavaScript expert myself.  ;)  You can try referencing that field another 
way (not using getElementById).  The only way I know of to print a JavaScript object 
to screen is to set one of your form fields to it's value...not much help in this case 
I'm afraid...



onClick=opener.document.getElementById(fieldName).value = 
self.document.getElementById(overrideExp).value; window.close


> -----Original Message-----
> From: Rea, Ron [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 08, 2002 10:28 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Is this possible?
> 
> 
> Hi Joe,
> 
> Thanks for reply.  I tried this, but I get an error when I 
> enter the pop-up
> screen saying that "overrideExp" is not an object.  I'm pretty new to
> javascript, so I'm not sure how to expose the data entered in 
> the pop-up,
> nor how to do a display within a javascript to see if the 
> entered data is
> going into a variable properly.  Any thoughts?
> 
> Thanks
> Ron
> 
> -----Original Message-----
> From: Joe Barefoot [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, October 07, 2002 7:36 PM
> To: Struts Users Mailing List
> Subject: RE: Is this possible?
> 
> From what I see, there's no logic in your popup to populate 
> the form field
> (the Explanation) in your opening window.  You need to pass 
> in the id of the
> explanation field so you can populate it when the popup is closed:
> 
> Your function needs to accept a 'fieldName' argument and then 
> do something
> like this when you hit the close button:
> 
> onClick=opener.document.getElementById(fieldName).value =
> this.document.getElementById(overrideExp).value; window.close
> 
> 
> Since you're using the nested tags, you'll have to figure out 
> what names it
> gives the fields in the generated HTML so you can pass those in to the
> JavaScript function.  I'm guessing it does something like:
> gridArray[i].overrideExp
> 
> 
> peace,
> Joe
> 
> 
> 
> > -----Original Message-----
> > From: Rea, Ron [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 07, 2002 4:46 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: Is this possible?
> > 
> > 
> > Hello, 
> > I'm not sure if this is possible from within a 
> > <nested:iterate> tag, any
> > help would be greatly appreciated!
> >  
> > From within my JSP, I am iterating through several rows of data and
> > displaying the data for modification.  One specific property is an
> > Explanation field.  What I'd like to do is create a "memo" 
> > link on each row
> > of data, and when that link is hit, a small page is displayed 
> > with only that
> > rows Explanation data.  The user enters up to 300 bytes of 
> > data for their
> > Explanation, within the pop-up, and when they close the 
> > pop-up, the specific
> > rows Explanation property is updated within the 
> > <nested:iterate> section.   
> >  
> > I can create the pop-up, but after I enter the data, the rows 
> > Explanation
> > property is not updated.  Any ideas?  Is this possible?
> >  
> > Thanks!
> >  
> > Example of code:
> >  
> > JSP:
> >     <nested:iterate property="gridArray">
> >             <td><nested:write property="msgCode" 
> > filter="true"/>&nbsp;</td>
> >             <td>
> >                         <nested:radio property="overrideInd"
> > value="A"/>Approve
> >                         <nested:radio property="overrideInd" 
> > value="D"/>Deny
> >             </td>
> >             <td>
> >                         <nested:hidden property="overrideExp"/>
> > <a href="javascript:getText('Override Explanation',
> > 'opener.document.form.overrideExp.value', 'Please enter an Override
> > Explanation in the following text area.', '<nested:write
> > property="overrideExp" filter="true"/>' ,'<nested:write 
> > property="msgCode"
> > filter="true"/>');" onMouseOver="window.status='Click to 
> > enter an Override
> > Explanation...';return true;" onMouseOut="window.status='';return
> > true;">memo</a>
> >             </td>
> >   </tr>
> >   </nested:iterate>
> >  
> > Javascript:
> > <SCRIPT LANGUAGE="JavaScript">
> > function getText(name, output, msg, dataValue, msgKey) {
> > newwin = window.open('','','top=150,left=150,width=325,height=330');
> > if (!newwin.opener) newwin.opener = self;
> > with (newwin.document)
> > {
> > open();
> > write('<html>');
> > write('<body onLoad="document.form.box.focus()"><form 
> > name=form>' + msg +
> > '<br>');
> > write('<p><left>Message Code: <strong>' + msgKey + '</strong>');
> > write('<p><center><textarea name=overrideExp rows=10 cols=30 
> > onKeyUp=' +
> > output + '=this.value>' + dataValue + '</textarea>');
> > write('<p><input type=button value="Click to close when finished"
> > onClick=window.close()>');
> > write('</center></form></body></html>');
> > close();
> >    }
> > }
> > </script>
> >  
> > 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to