Is there a way so I can do this:
function doAction()
{
var theType=document.Criteria.selectType;
var theType=theType.options[theType.selectedIndex].value;
var theYear =document.Criteria.selectYear;
var theYear = theYear.options[theYear.selectedIndex].value;
var thePeriod =document.Criteria.selectPeriod;
var thePeriod = thePeriod.options[thePeriod.selectedIndex].value;
var theCntry =document.Criteria.selectCntry;
var theCntry = theCntry.options[theCntry.selectedIndex].value;
return "dvectrpg.php?product=<?php echo $dta_class; ?>&type=" + theType + "&year=" + theYear + "&period=" + thePeriod + "&cntry=" + theCntry ;
}
<form name="Criteria" method="post" action="javascript:doAction();">
In stead of my original code know:
<form name="Criteria" method="post" action="dvectrpg.php?product=<?php echo $_GET['product'] ?>&type=<?php echo $_GET['type'] ?>&year=" + <?php echo $_GET['year'] ?> + "&period=<?php echo $_GET['period'] ?>&cntry==<?php echo $_GET[cntry] ?>">
that need this javascript-code first (so the page has to refresk (pink) first):
document.location = "dvectzpg.php?product=<?php echo $dta_class; ?>&type=" + theType + "&year=" + theYear + "&period=" + thePeriod + "&cntry=" + theCntry ;
function doAction()
{
var theType=document.Criteria.selectType;
var theType=theType.options[theType.selectedIndex].value;
var theYear =document.Criteria.selectYear;
var theYear = theYear.options[theYear.selectedIndex].value;
var thePeriod =document.Criteria.selectPeriod;
var thePeriod = thePeriod.options[thePeriod.selectedIndex].value;
var theCntry =document.Criteria.selectCntry;
var theCntry = theCntry.options[theCntry.selectedIndex].value;
return "dvectrpg.php?product=<?php echo $dta_class; ?>&type=" + theType + "&year=" + theYear + "&period=" + thePeriod + "&cntry=" + theCntry ;
}
<form name="Criteria" method="post" action="javascript:doAction();">
In stead of my original code know:
<form name="Criteria" method="post" action="dvectrpg.php?product=<?php echo $_GET['product'] ?>&type=<?php echo $_GET['type'] ?>&year=" + <?php echo $_GET['year'] ?> + "&period=<?php echo $_GET['period'] ?>&cntry==<?php echo $_GET[cntry] ?>">
that need this javascript-code first (so the page has to refresk (pink) first):
document.location = "dvectzpg.php?product=<?php echo $dta_class; ?>&type=" + theType + "&year=" + theYear + "&period=" + thePeriod + "&cntry=" + theCntry ;