根据下拉列表中选择的选择,在不同的DIV中检索和显示 [英] Retrieve and Display in different DIV based on selection chosen in drop down list

查看:83
本文介绍了根据下拉列表中选择的选择,在不同的DIV中检索和显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi


i创建了一个下拉列表并检索并分配属性(S_Date)中的值作为选项:



< form method =" post" name =" sales">年:

< select name =" sales" id =" sales">

<?php

do {

?> < option value ="<?php echo $ row_sales ['S_Date']?>">

<?php echo $ row_sales ['S_Date']?>< ; / option>

<?php

} while($ row_sales = mysql_fetch_assoc($ sales));

$ rows = mysql_num_rows( $ sales $;
if($ rows> 0){

mysql_data_seek($ sales,0);

$ row_sales = mysql_fetch_assoc( $ sales $;>
}

?> < / form>







我可以知道如何检索和显示过滤后的数据div(report_area)基于下拉列表中选择的年份?



我正在尝试创建不同类型的销售报告(将检索值来自db的不同属性集;报告将以图表的形式显示,因此[使用js]),其中链接将显示在相应的< Div>中。基于下拉列表中选择的年份。任何人都遇到过可能对我有用的任何教程?谢谢!

hi
i have created a drop down list and retrieved and assign values in an attribute (S_Date) as the option:

<form method="post" name="sales">Year:
<select name="sales" id="sales">
<?php
do {
?> <option value="<?php echo $row_sales['S_Date']?>">
<?php echo $row_sales['S_Date']?></option>
<?php
} while ($row_sales = mysql_fetch_assoc($sales));
$rows = mysql_num_rows($sales);
if($rows > 0) {
mysql_data_seek($sales, 0);
$row_sales = mysql_fetch_assoc($sales);
}
?> </form>



May i know how to retrieve and display the filtered data in a div ("report_area") based on the year selected in the drop down list?

i'm trying to create different types of sales reports (which will retrieve values from different set of attributes from the db; report will be displayed in form of charts and so [using js]) where the links to them will appear in the respective <Div> based on the year selected in the drop down list. Anyone has come across any tutorial or so that might be useful to me? Thanks!

推荐答案

row_sales ['S_Date']?>">

<?php echo
row_sales['S_Date']?>">
<?php echo


row_sales ['S_Date']?>< / option>

<?php

} while(
row_sales['S_Date']?></option>
<?php
} while (


row_sales = mysql_fetch_assoc(
row_sales = mysql_fetch_assoc(


这篇关于根据下拉列表中选择的选择,在不同的DIV中检索和显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆