在FF 3.6和FF 4.01中传递表单ID [英] Passing form id in FF 3.6 vs. FF 4.01

查看:99
本文介绍了在FF 3.6和FF 4.01中传递表单ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们从FireFox 3.6升级到FireFox 4.01时,我的表单坏了


我在select控件上使用onchange事件处理程序。在该处理程序中,我传递对控件this的引用。


在我的javaScript的第二个代码片段中,我从this中提取对父窗体的引用。


在FF 3.6中,我可以使用此引用:var oForm = obj.form.id;。但在FF 4.01中,形式返回null。怎么会?我需要通过该引用,或者我可以从this中以其他方式阅读该引用。这将在FF 3.6和4.01中工作?

My form broke when we upgraded from FireFox 3.6 to FireFox 4.01

I use an onchange event handler on my select control. In that handler I pass a reference to the control "this".

In the 2nd code snippet from my javaScript, I extract a reference to the parent form from "this".

In FF 3.6 I could use this reference: "var oForm = obj.form.id;". But in FF 4.01 the "form"returns a null. How come? and what do I need to pass that reference or can I read that reference some other way from "this" that will work in both FF 3.6 and 4.01?

展开 | 选择 | Wrap | 行号

推荐答案

我想我需要对表单的引用,因为我与表单中同一行上的其他控件进行交互。如果添加或减去时间将影响其他选择和复选框等允许的时间量。


这里是其他控件的快照,只有一行是显示(表格可以包含多行)

I think I need the reference to the form because I interact with other controls on the same line in the form. If time is added or subtracted that will affect what amount of time is permitted in the other selects and check boxes etc.

here is a snap shot of the other controls when only one line is displayed (the form can contain multiple lines)


我现在甚至尝试传递this.form并且它仍然无法使用这些行。
I have now even tried to pass "this.form" and it still does not work with these lines.
展开 | 选择 | Wrap | 行号


函数是什么 NoPTOorOff() 应该做什么?
what is the function NoPTOorOff() supposed to do?


这篇关于在FF 3.6和FF 4.01中传递表单ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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