自动填充表单字段,几乎正常工作 [英] Autofill form fields, almost working

查看:75
本文介绍了自动填充表单字段,几乎正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿所有人,


在问了很多问题之后,我几乎有了这个工作。


这是它的工作原理。基本上我填写我的客户编号字段填充我的下拉框。从下拉框中选择一个选项后,它会填充表单的其余部分。我遇到的问题是,如果下拉框中不存在客户编号,我会尝试在输入中输入新的客户编号538,然后点击另一个字段,如名字,我会收到错误说预期的对象。一个井,我不明白为什么它说。我真的可以使用一些帮助来解释为什么我会收到这个错误。


我之前开始讨论这个问题,你可以在这里看到。不知道这是否会有所帮助,但我想无论如何都会发布它。
http://bytes.com/forum/showthread.ph...05#post3315805


这是我的表格

Hey Everyone,

Well after asking many questions i have this almost working.

This is how it works. Basically i fill in my customer number field an that populates my drop down box. Once i select an option from the drop down box it populates the rest of the form. The problem i am having is that if a customer number doesn''t exist in the drop down box an i try to put a new customer number in the input say 538 an then click on another field such as first name i get an error saying Object expected. An well i can''t figure out why its saying that. An could really use some help as to why i am getting this error.

i started a topic earlier about this which you can see here. don''t know if this will help in anyway but thought i would post it anyway.
http://bytes.com/forum/showthread.ph...05#post3315805

here is my form

展开 | 选择 | Wrap | 行号

推荐答案

展开 | 选择 | Wrap | 行号


嘿记录员,


我试过了,但我仍然得到同样的错误。我不得不做出一些改变,因为我意识到我试图做你告诉我的事情,我的表格甚至不是自动填充。我还意识到,当我尝试创建一个新的客户编号时,我也遇到了同样的错误,当我自动填充表格时,我想知道问题是否与onchange有关?但这里是我改变的其他部分是相同的。


表格页面上的javascript
Hey Logician,

Well i tried that but i am still getting the same error. an i had to make some changes because i realized after i tried to do what you told me that my form was not even auto populating. An i also realized i am getting the same error when i try to create a new customer number an also when i autopopulate the form which makes me wonder if maybe the problem is with onchange? but here is the parts i changed everything else is the same.

javascript on form page
展开 | 选择 | 换行 | 行号


自动完成无法工作的原因是您忘记更改此行
The reason the auto-complete isn''t working is that you forgot to change this line
展开 | 选择 | Wrap | 行号


这篇关于自动填充表单字段,几乎正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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