...

View Full Version : Form submition, new window (popup)



Eli.
12-24-2007, 02:37 PM
Hey,
I have a few problems I'm trying to solve.

what I have is page with a form, containing some check-boxes (to compare items),
and three possible actions:
View selected items
Print selected items
Compare selected itemsI want the new form to
Open in new window (preferably with no status bar, command buttons etc')
be compatible for older browsers and no-javascript supportThe problems I'm having are that after opening a new window (myWindow=window.open(..)),
if I change my forms' target t myWindow, and try to submit my form (via JS, i.e. myForm.submit()) IE7 blocks it as a popup although my window is already open.

another problem is if I set my forms' target (in raw HTML, no JS) to "_blank", the form is not submitted, and I'm getting only the current URL again in the new window.

Any ideas how I can perform one of the three actions with the requirements I have? I'm pretty stuck on this one...

Thanks

koyama
12-27-2007, 05:29 AM
another problem is if I set my forms' target (in raw HTML, no JS) to "_blank", the form is not submitted, and I'm getting only the current URL again in the new window.
I'm not sure why you say that the form is not submitted. There shouldn't be any problem with this approach to my knowledge.

PHP Example. Self-submitting form. When user submits the form a new page opens in a new window.

index.php


<?php
/* PHP statements, form handling */
?>
<form action="" method="post" target="_blank">
<div>
<input name="Submit" type="submit">
</div>
</form>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum