× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: F4 in a web page
  • From: "David Morris" <dmorris@xxxxxxxxxxxxx>
  • Date: Tue, 14 Aug 2001 11:52:55 -0600

Geert, 

You have quite a few options.  For a JSP page I would probably lean toward a 
custom tag that built the list up front.  That works pretty good if the list 
does not 
contain too many values.  For something that does require more values, You 
might just generate a list on the server when a button is pressed and put that 
in a scrollable table (if your browsers support it) or a selection list. A lot 
of how 
you do this depends on how you identify your servlet URL's and where you are 
coming from. On our system, which uses Struts, I would redirect from the 
servlet 
page to the .jsp page containing the custom tag using a simple java script.

The only Java script you would need with either of these  would be to return 
the 
value from the form.  I usually use a function that takes an action which is 
set in 
a hidden value in the form. If an action is not passed to the function I set it 
to a 
specific value so I can determine when a request come from within the page 
something like:

<script langeage="JavaScript">
function sf(act) {
  myForm.action.value='int';
  if (act != '' && act != null) {
    myForm.action.value=act;
  }
  myForm.submit();
}
</script>

I am no expert at Java Script and I have found it is very difficult to debug 
(at 
least I haven't found a good way other than logging). This puts all of the work 
on the server which may take a second, but you don't have to do the work 
unless the list is requested. Hopefully this is helpful.

David Morris



>>> gvl@reynderseti.be 08/14/01 03:47AM >>>
Hi all,

I was wondering how the following scenario could be implemented by using
servlet/jsp/javascript techniques:

- A web page shows a detail of an article (create/modify)
- The field containing the type of article must be selected by clicking a 
  button which shows a list of codes on another page (F4)
- If a code gets selected (through hyperlink or selecting a checkbox?)
  the previous page is shown with the selected type code filled in ...

Does anybody has experience with this? and wants to share insights and
source code?

Thanks 


Geert Van Landeghem
Reynders Etiketten N.V
*   +32-(0)3/460.32.81 
* +32-(0)3/455.18.83 
M      +32-0477/75.95.33 
*   gvl@reynderseti.be 

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.