Hi,
I have two dropdown and want to get the selected year value of the first one and add it to the url of the header page and also to the second dropdown url options so that when I select a php page from the second dropdown I can see the year value on the page.I past my code here but the selected year doesn't show on the php page.
<form method="post">
Report Period:
<select name="mySelect" id="mySelect" onchange="'header.php?year='+this.value" >
<option style="display:none;"> Select</option>-->
<?php
$result1 = mysql_query("select id,year from year_data where org_id=$org_id") or die(mysql_error());
while ($row = mysql_fetch_assoc($result1)) {
$period= $row['year'];
$period_id=$row['id'];
echo "<option value=\"$period\">$period</option>";
}
?>
</select>
Report Type:
<select name="selectreport" id="selectreport" >
<option style="display:none;">--Select--</option>
<?php
echo "<option value=\"".reportA.".php?org_id={$org_id}&year=".$_GET['year']."\">report A</option>";
echo "<option value=\"" . reportB . ".php?org_id={$org_id}&year=".$_GET['year']."\">report B</option>";
?>
</select>
<input type=submit name=button method="post" onClick="window.open(selectreport.value,
'popUpWindow','height=800,width=1000,left=200,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');"value="view" >
</form>
-- I have two dropdown and want to get the selected year value of the first one and add it to the url of the header page and also to the second dropdown url options so that when I select a php page from the second dropdown I can see the year value on the page.I past my code here but the selected year doesn't show on the php page.
<form method="post">
Report Period:
<select name="mySelect" id="mySelect" onchange="'header.php?year='+this.value" >
<option style="display:none;"> Select</option>-->
<?php
$result1 = mysql_query("select id,year from year_data where org_id=$org_id") or die(mysql_error());
while ($row = mysql_fetch_assoc($result1)) {
$period= $row['year'];
$period_id=$row['id'];
echo "<option value=\"$period\">$period</option>";
}
?>
</select>
Report Type:
<select name="selectreport" id="selectreport" >
<option style="display:none;">--Select--</option>
<?php
echo "<option value=\"".reportA.".php?org_id={$org_id}&year=".$_GET['year']."\">report A</option>";
echo "<option value=\"" . reportB . ".php?org_id={$org_id}&year=".$_GET['year']."\">report B</option>";
?>
</select>
<input type=submit name=button method="post" onClick="window.open(selectreport.value,
'popUpWindow','height=800,width=1000,left=200,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');"value="view" >
</form>
You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.