Click to See Complete Forum and Search --> : POPUP FORMS JAVASCRIPT - How?


amacfarl
10-20-2003, 10:00 AM
Hi All

I am using the following function

function sellerProducts(seller) {
var page = "rpProducts.jsp?seller=" + seller;
features = "" + "width=" + 770 + "," +
"height=" + 400 + "," +
"top=" + 50 + "," + "left=" + 50 + "";
var popup = window.open( page, 'fullPopup', features );
popup.focus();
}

Is there any way of using FORMs to display a popup window. The reason is I want to post more variables than just the seller name.

Form would be perfect, however can I still do it with all the functionality of setting window size etc.. etc..

Thanks in advance
Angus

Bootsman123
10-20-2003, 11:07 AM
I always use this (between the <head>):
<script language="javascript">
function link (file_vars)
{
window.open(file_vars,"","height=300,width=400,left=0,top=0,resizable=no,toolbar=no,scrollbars=yes");
}
</script>

JavaScript:link
('
page.ext
?var1=var1
&var2=var2
&var3=var3
');

amacfarl
10-20-2003, 11:24 AM
Thanks for replying

The issue is not displaying the popup window. The issue is posting values to the popup window whilst remaining on the current one

Thanks in advance

Angus

requestcode
10-20-2003, 01:06 PM
Do you want to populate a form in the popup when you open the window or once it is opened you want to be able to populate form fields in the popup? You can reference a form field in the popup this way:
popup.document.form_name.field_name.value="some value"

you have to specify the variable you used to open the window, the form name and the field name. "popup" is the variable you used to open the window.

amacfarl
10-20-2003, 01:58 PM
Not exactly,

When the user submits a form in a normal page the details of what the user has entered is passed to a popup window. and the original page remains without refresh.

Errrr... this issue is driving me insane.

HELP PLEASE