Passing parameters in a pop up window

i just wanna know how to pass parameters in a pop up window.. thanks
[75 byte] By [BABY_GIRLa] at [2007-10-3 1:28:30]
# 1

hai have a nice day

in java script u use the following method

window.open("programname?variable name="+document.forms[0].parameter name(html input element).value+"&variable name="+document.forms[0].parameter name(html input element)..value,"","width=250,height=280,top=20,left=5,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes,scrolling=no");

u use it and retrieve the values using variable name in popup window

regards

Aravind

anandarava at 2007-7-14 18:26:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
thank you.. i will try it
BABY_GIRLa at 2007-7-14 18:26:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

hi.. question again.. is my code correct? Thank you for checking

function NewWindow (jsppage,cmbmonth,cmbyear)

{

page = jsppage+'?cmbmonth='+cmbmonth+ '&cmbyear=' +cmbyear

document.getElementById(page).onclick = popUp;

window.open(jsppage,"","height=250,width=400,status=no,location=no,toolbar=no,directories=no,menubar=no");

}

<input type ="button" onclick="NewWindow ('SP_2.jsp', this.form.cmbmonth.value,this.form.cmbyear.value)" >

BABY_GIRLa at 2007-7-14 18:26:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

Hi baby,

> document.getElementById(page).onclick = popUp;

The above line appears strange to me ..

I have a simpler version for you based on ur code ...

function NewWindow (jsppage)

{

var mnth = document.forms[0].cmbmonth.value;

var yr = document.forms[0].cmbyear.value;

page = jsppage+'?cmbmonth='+mnth + '&cmbyear=' +yr

window.open(jsppage,"","height=250,width=400,status=no,location=no,toolbar=no,directories=no,menubar=no");

}

<input type ="button" onclick="NewWindow ('SP_2.jsp')" >

So youe need not pass the cmbmonth , cmbyear value in every function call since u can access the value within javascript itself.

By the way I hope cmbmonth & cmbyear are not drop downs otherwise you might need to do like this ..

var ind = document.forms[0].cmbmonth.selectedIndex;

var mnth = document.forms[0].cmbmonth[ind].value;

RohitKumara at 2007-7-14 18:26:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...