Form Submittal In Multiple Windows?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Floria

    #1

    Form Submittal In Multiple Windows?

    Hello,

    I have several links on my page that run reports. Each link submits a
    seperate form. The onclick event of the link opens a new named window
    where I control the "chrome". The form's target is set to that new
    window.

    This works as expected, but is not exactly what we need. We'd like to
    open a new window with no features for each click of the link (So the
    user can see the previous report, since it may have been run using
    different paramters). Currently each click of the link displays the
    report in the same window that was previously opened. Is this
    possible?
  • Dom Leonard

    #2
    Re: Form Submittal In Multiple Windows?

    John Floria wrote:
    [color=blue]
    > I have several links on my page that run reports. Each link submits a
    > seperate form. The onclick event of the link opens a new named window
    > where I control the "chrome". The form's target is set to that new
    > window.
    >
    > This works as expected, but is not exactly what we need. We'd like to
    > open a new window with no features for each click of the link (So the
    > user can see the previous report, since it may have been run using
    > different paramters). Currently each click of the link displays the
    > report in the same window that was previously opened. Is this
    > possible?[/color]

    You could try changing the target attribute of the report form as each
    report is opened, along the lines of:

    ----

    var featureString=" height=400,widt h=600";
    var windowCount=0;
    var windowName="myR eportWindow";
    function tryIt( oForm)
    {
    var nextWindowName= windowName + (windowCount++) ;
    oForm.target = nextWindowName;
    window.open("", nextWindowName, featureString);
    return true;
    }

    ....
    and in HTML
    ....

    <form name="report0" action="report0 .php" onsubmit="tryIt (this)">
    ...
    <input type="submit"
    value="trial report0 with these values (opens new window)">
    </form>

    ------

    Technially seems to checkout in Mozilla 1.4, IE6.0 and Opera 7.2 (with
    preferences set to allow unrequested popups of course).



    HTH

    Dom




    Comment

    Working...