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
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)" >
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;