xsl验证问题 [英] xsl validation problem

查看:69
本文介绍了xsl验证问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是rahul在这里


i陷入了1个问题..........


i有2个输入框和我的xsl文件.1st将显示卡号。学生和第二个将在他的余额字段中显示金额。这个数据我从我的xml文件中退回。

现在我想要的是编辑卡号。和金额字段,但有1个验证,如果学生正在更改其卡号。那么只有平衡字段应该启用否则禁用。

即如果卡号没有改变那么只有​​他应该能够改变平衡字段。


我正在做的是恢复原始值cardno。在java脚本中,如果no更改则检查no输入文本框,然后启用balance字段。

并且此方法称为onkeyup事件。


所以请让我知道你的想法..................

这里是示例代码.........

(这是xsl文件)

展开 | 选择 | Wrap | 行号

解决方案

我将线程从文章部分移动到论坛部分。

请不要在文章部分发帖。


谢谢,

Dorin。


抱歉并感谢将其发布到论坛


尝试使用id而不是name属性来输入文本框:

< input type =" text" id =" cardno" ....

< input type =" text" id =" balance" ...


然后在javascript更新:

var cardNo = document.getElementById(" cardno")。value;

hi this is rahul here

i am stucked in 1 problem..........

i have 2 input box and in my xsl file .1st will display the card no. of student and the second will display the amount in his balance field.this data i am retreving from my xml file.
now what i want is to edit the card no. and amount field but ,there is 1validation that if the student is changing its card no. then only the balance field should be enable otherwise disable .
that is if the card no is changed then only he should be able to change balance field.

what i am doing is retriving the original value cardno. in java script and check with the no entered in text box if the no is changed then the balance field is enabled.
and this method is called onkeyup event.

so please do let me know ur thoughts ..................
here is the sample code.........
(this is xsl file)


Expand|Select|Wrap|Line Numbers

解决方案

I will move the thread from Articles section to Forum section.
Please do not post in Articles section.

Thanks,
Dorin.


sorry and thanks for posting it to forums


Try to use id instead of name attribute for input textboxes:
<input type="text" id="cardno"....
<input type="text" id="balance"...

then in javascript update:
var cardNo=document.getElementById("cardno").value;


这篇关于xsl验证问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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