You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Cook, Graham" <gr...@cgey.com> on 2002/12/04 16:31:07 UTC

RE: calling ACTION from SEARCH button, results displayed in new w indo w

The field on the form is part of a company name, the popup window will be a
list of all names in the database that match what the user has typed in the
input field.

I know that I need to use Javascript to create the popup, what i need to
know is whether or not i can pass the JSP field into a javascript function,
then call an action. Or do i need to hardcode the field reference in the
Javascript method ie . document.form.companyname 

-----Original Message-----
From: Cook, Graham [mailto:graham.cook@cgey.com]
Sent: 04 December 2002 14:44
To: 'struts-user@jakarta.apache.org'
Subject: calling ACTION from SEARCH button, results displayed in new
windo w


How do you go about calling an action from a SEARCH button on a JSP, and
passing in one of the JSP fields to the action in order to bring up a popup
window with data related to the field on the JSP. eg. like part of a name
that you want to search on?


****************************************************************************
****************
" This message contains information that may be privileged or confidential
and 
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for 
the person to whom it is addressed. If you are not the intended recipient,
you 
are not authorized to read, print, retain, copy, disseminate, distribute, or
use 
this message or any part thereof. If you receive this message in error,
please 
notify the sender immediately and delete all copies of this message ".
****************************************************************************
****************


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: calling ACTION from SEARCH button, results displayed in new w indo w

Posted by Gemes Tibor <ge...@regens.hu>.
2002. december 4. 16:31 dátummal Cook, Graham ezt írtad:
> The field on the form is part of a company name, the popup window will be a
> list of all names in the database that match what the user has typed in the
> input field.
>
> I know that I need to use Javascript to create the popup, what i need to
> know is whether or not i can pass the JSP field into a javascript function,
> then call an action. Or do i need to hardcode the field reference in the
> Javascript method ie . document.form.companyname

This is really OT on this list. 

function populateLOV(obj) {
	var url=...;
	url += '?myParam=' + obj.value;
	showLOV(url);
	return false;
}

<input type="button" onclick="return populateLOV(this)">

Tib

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>