By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,466 Members | 1,148 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,466 IT Pros & Developers. It's quick & easy.

Form Submittal In Multiple Windows?

P: n/a
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?
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
John Floria wrote:
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


Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.