sta*_*NCT 1 javascript ultrawebgrid
我正在使用Ultrawebgrid进行申请:
当用户点击该特定行时,我正在使用textarea在行模板中列出我的应用程序中的错误...
所以当有任何错误时我需要texarea .....否则当没有错误时我甚至不想让row_template弹出.....我正在使用IE6.
我正在检查是否有任何错误使用javascript.so我必须使用javascript事件处理程序:: UltraWebGrid1_BeforeRowTemplateOpenHandler(gridName,rowId,templateId)
在哪里写下面给出的语句: document.getElementById("TextArea2").style.visibility ="collapse" 在上面的事件函数中
1)它显示javascript错误为 "无法获取可见性属性:无效的参数" 但行模板没有弹出..... ..只有错误来了....
2)当没有错误时,是否有任何代码可以阻止行模板.我的意思是没有pop_up没有错误
这是什么解决方案???
显示
使用显示而不是可见性.这在文档中不占用空间.
document.getElementById("TextArea2").style.display = 'none'; // Turn off
document.getElementById("TextArea2").style.display = 'inline'; // Turn on
Run Code Online (Sandbox Code Playgroud)
能见度
document.getElementById("TextArea2").style.visibility="hidden"; // Turn off
document.getElementById("TextArea2").style.visibility="visible"; // Turn on
Run Code Online (Sandbox Code Playgroud)
通过使用上面的代码,textarea将不可见,但文档中将有空格,其中包含textarea的高度和宽度.
此外,仅在Internet Explorer 8中支持"折叠"值