Form Submittal In Multiple Windows?

J

John Floria

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?
 
D

Dom Leonard

John said:
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?

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

----

var featureString="height=400,width=600";
var windowCount=0;
var windowName="myReportWindow";
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top