为什么我收到Javascript(表单)或(this.form)错误? [英] Why am I getting Javascript (form) or (this.form) errors?

查看:62
本文介绍了为什么我收到Javascript(表单)或(this.form)错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在现有的,经过测试和工作的程序中,我有一个表单条目,

简化为......


< INPUT name =" fp1s"类型= QUOT;文本" value = 0.000 size = 12>


和一个按钮...


< input type =" button"值= QUOT;设置幅度

onclick =" setAmplitude(this.form)">


setAmplitude函数执行的操作之一是计算p1s

值,然后做...


form.fp1s.value = p1s;


这似乎工作正常。我想在程序中添加一个新功能

,添加一个新按钮


< input type =" button"值= QUOT;提高" onclick =" imProveX

(this.form)">


imProveX的初始功能是...

函数imProveX(form){setAmplitude(this.form);

};


这应该和其他按钮做同样的事情确实如此,除了来自新的proc中的
而不是点击按钮。 Instaad,错误...


''fp1s''为空或不是对象


返回。


我做错了什么?


完整代码显示为 http://www.tinaja.com/demo28q.asp

-

非常感谢,


Don Lancaster语音电话:(928)428-4073

Synergetics 3860 West First Street Box 809撒切尔,AZ 85552

rss : http://www.tinaja.com/whtnu.xml 电子邮件: do*@tinaja.com


请访问我的GURU的LAIR网站 http://www.tinaja.com


In an existing, tested and working program, I have a form entry that
simplifies to...

<INPUT name ="fp1s" type="text" value=0.000 size=12 >

and a button of...

<input type="button" value=" Set Amplitude "
onclick="setAmplitude (this.form)">

One of the things the setAmplitude function does is calculate a p1s
value and then does a...

form.fp1s.value = p1s ;

This seems to work fine. I wanted to add a new feature to the program
by adding a new button of

<input type="button" value="Improve?" onclick="imProveX
(this.form)">

An initial function for imProveX was...

function imProveX (form) { setAmplitude (this.form) ;
} ;

This should be doing the same thing the other button does, except from
within a new proc instead of a button click. Instaad, an error of ...

''fp1s'' is null or not an object

gets returned.

What am I doing wrong?

The full code appears as http://www.tinaja.com/demo28q.asp
--
Many thanks,

Don Lancaster voice phone: (928)428-4073
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml email: do*@tinaja.com

Please visit my GURU''s LAIR web site at http://www.tinaja.com

推荐答案

2007年3月24日星期六08:51:19 -0700,Don Lancaster< do*@tinaja.com>

给我们:
On Sat, 24 Mar 2007 08:51:19 -0700, Don Lancaster <do*@tinaja.com>
Gave us:

>
在现有的,经过测试和工作的程序中,我有一个表单条目,简化为......


< INPUT name =" fp1s"类型= QUOT;文本"值= 0.000大小= 12>

和一个按钮...


< input type =" button"值= QUOT;设置幅度

onclick =" setAmplitude(this.form)">

setAmplitude函数执行的任务之一是计算p1s
值然后再做...


form.fp1s.value = p1s;

这似乎工作正常。我想通过添加一个新按钮来添加一个新功能


< input type =" button"值= QUOT;提高" onclick =" imProveX

(this.form)">

imProveX的初始功能是...


函数imProveX(form){setAmplitude(this.form);

};

这应该和其他按钮做同样的事情,除了
在新的proc中,而不是按钮单击。 Instaad,错误...


''fp1s''为空或不是对象

返回。

我做错了什么?

完整的代码显示为 http ://www.tinaja.com/demo28q.asp



取决于您拥有的java版本以及您正在开发的内容

脚本及其共同兼容性。


Depends on what version of java you have, and what you are developing
scripts under, and their co-compatibilities.


MassiveProng写道:
MassiveProng wrote:

2007年3月24日星期六08 :51:19 -0700,Don Lancaster< do*@tinaja.com>

给我们:

On Sat, 24 Mar 2007 08:51:19 -0700, Don Lancaster <do*@tinaja.com>
Gave us:


> ;>在现有的,经过测试和工作的程序中,我有一个表单条目,简化为......

< INPUT name =" fp1s"类型= QUOT;文本"值= 0.000大小= 12>

和一个按钮...

< input type =" button"值= QUOT;设置幅度
onclick =setAmplitude(this.form)">

setAmplitude函数执行的操作之一是计算p1s
值然后执行a ...

form.fp1s.value = p1s;

这似乎工作正常。我想通过添加一个新的按钮来添加一个新功能

< input type =" button"值= QUOT;提高" onclick =" imProveX
(this.form)">

imProveX的初始函数是......

函数imProveX(form){setAmplitude (this.form);
};

这应该与其他按钮做同样的事情,除了在新的proc中而不是点击按钮。 Instaad,错误...

''fp1s''为null或不是对象

返回。

我在做什么错了?

完整的代码显示为 http:// www .tinaja.com / demo28q.asp




取决于您拥有的java版本以及您正在开发的内容

脚本及其共同兼容性。


Depends on what version of java you have, and what you are developing
scripts under, and their co-compatibilities.



JavaScript 1.1正在使用Adobe GoLive 5.0开发。


-

非常感谢,


Don Lancaster语音电话:(928)428-4073

Synergetics 3860 West First Street Box 809撒切尔,AZ 85552

rss: http://www.tinaja.com/whtnu.xml 电子邮件: do*@tinaja.com


请访问我的GURU的LAIR网站< a rel =nofollowhref =http://www.tinaja.comtarget =_ blank> http://www.tinaja.com

JavaScript 1.1 being developed with Adobe GoLive 5.0.

--
Many thanks,

Don Lancaster voice phone: (928)428-4073
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml email: do*@tinaja.com

Please visit my GURU''s LAIR web site at http://www.tinaja.com


3月24日上午10点05分,MassiveProng

< MassivePr ... @ thebarattheendoftheuniverse.orgwrote:
On Mar 24, 10:05 am, MassiveProng
<MassivePr...@thebarattheendoftheuniverse.orgwrote :

< input type =" button"值= QUOT;提高" onclick =" imProveX

(this.form)">
<input type="button" value="Improve?" onclick="imProveX
(this.form)">


function imProveX(form){setAmplitude(this.form);
function imProveX (form) { setAmplitude (this.form) ;



这里指的是imProveX函数,并且函数没有形式

属性。将参数传递给setAmplitude函数和

一切都应该没问题。


函数imProveX(form){setAmplitude(form);

here this refers to the imProveX function and there is no form
property for function. pass the argument to setAmplitude function and
all should be fine.

function imProveX (form) { setAmplitude (form) ;


取决于你拥有的java版本,以及你正在开发什么版本的b $ b脚本及其共同兼容性。
Depends on what version of java you have, and what you are developing
scripts under, and their co-compatibilities.



?????????????

??????????????


这篇关于为什么我收到Javascript(表单)或(this.form)错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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