受控/依赖列表 - 专家;) [英] Controlled/Dependent Lists - for experts ;)

查看:45
本文介绍了受控/依赖列表 - 专家;)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我现在正试图在表单中设置一个依赖列表


我的表单是一个基于查询的表单


即我从这个表格填写我的MySQL查询


我有大约30个字段/列


每个都有多少值...有时2,有时20 ......也许更多!


我在网上搜索了一个javascript代码,帮助我做依赖列表


我找到了一些功能..但他们的工作取决于INDEX!


他们是非常强大的功能..我喜欢他们..但不知道如何修改它们直到我得到我正在寻找的东西


这就是我发现的(在两个差异网站中) - 它如果你复制并粘贴然后尝试它就可以了!

展开 | 选择 | Wrap | 行号

解决方案

你正在攻击别人的代码来一次性生成一个解决方案。

如果你知道自己在做什么就好了。

将这个项目分解为简单的步骤并依次解决每个问题。

你肯定不要指望我们趟过这一批并让它像你期待的那样工作?


好吧,我在两个地方找到了这个代码..他们说读者可以看看网页来源 - 即他们允许这样做


我在这里发布了代码,所以你们可以很容易地理解我在说什么


这不是很多问题 - 这只是一个问题调用(受控/依赖2个列表),其中在一个列表中选择的内容应该在第二个列表中的mysql查询中使用以获取第一个列表选择的值

Heya,coool 。


所以想法是有两个选择元素,当你从第一个选择中选择任何东西时,第二个选择将根据你选择的内容进行填充。听起来不错吗?


Hi

I''m now trying to have a dependent lists in a form

my form is a query based form

i.e. I fill my MySQL query from this form

I have around 30 fields/columns

each have number of values... sometimes 2 , sometimes 20.. maybe more !

I''ve searched the web to find a javascript code that helps me to do the dependent lists

I found few funtions.. but their work depends on INDEX !

they''re very powerful functions.. i liked them.. but didn''t know how to modify them until i get what i''m looking for

This is what I''ve found ( in two diff websites) - it''s working if you copied it and pasted then tried it !

Expand|Select|Wrap|Line Numbers

解决方案

You are hacking somebody elses code to produce a solution in one go.
Fine if you know what you are doing.
Break this project into simple steps and solve each problem in turn.
You surely don''t expect us to wade through this lot and make it work like you are expecting?


well, I found this code in two places.. and they said there to readers to look at the webpage source - i.e. they gave the permission to do that

I posted the code here so you guys can understand easily what I''m talking about

this is not many problems together - it''s only one problem called (controlled/dependent 2 lists) where what''s selected in one list should be used in mysql query in the second list to get the values of the first list selection


Heya, coool.

So the idea is to have two select elements, and when you select anything from the first select, the second select gets populated depending on what you picked. Does that sound right?


这篇关于受控/依赖列表 - 专家;)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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