popup windows in struts


General J2EE: popup windows in struts

  1. popup windows in struts (1 messages)

    I have a form to enter data. But for some data elements, I only want to display the required fields on the form. I want to provide an edit button for that data element, so that when the user click on 'edit', a popup window comes up for the user to edit the required and optional data for that data item.

    So, I have 1 struts action which has 2 forwards, the forward1 returns to the same page and the forward2 (I want to) pops up a new windows with a jsp. I don't know how to make Struts popup a window with a new jsp. My action class inherits from LookupDispatchAction, each of 2 methods in the action associate with one forward.

    My questions are:

    1. What struts tag can I use to popup a new window?
    2. Any alternative ways to do this? Like how can I redirect to a jsp which will be popped up?

    Threaded Messages (1)

  2. popup windows in struts[ Go to top ]

    try this out:


    <SCRIPT LANGUAGE="JavaScript">

    <!-- Begin
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=200,height=300');");
    // End -->

    <input type=button value="Open the Popup Window" onClick="javascript:popUp('http://mystrutsaction.do')">

    This will just create a popup window with your action being the delivery vehicle for the page..