[英]Hide value in JAVAScript modal pop-up
<select onchange="SUGAR.email2.composeLayout.applyEmailTemplate('0',
this.options[this.selectedIndex].value);" id="email_template0" name="email_template0">
<option value="">-none-</option>
<option value="159a06ef-4d58-6eff-a969-52fdff05d328">Case Closure</option>
<option value="182641ab-44c0-719d-04b3-52fdffa2b2d2">Case Creation</option>
</select>
I have this java modal pop-up. 我有这个Java模式弹出窗口。 I would like to hide certain values ie 159a06ef-4d58-6eff-a969-52fdff05d328.
我想隐藏某些值,即159a06ef-4d58-6eff-a969-52fdff05d328。 Incidentally these are drop-down values.
顺便说一下,这些是下拉值。
I've tried this but it don't work. 我已经尝试过了,但是没有用。
$(document).on('DOMNodeInserted', '#composeHeaderTable0', function(event) {
$("#email_template0 option[value='159a06ef-4d58-6eff-a969-52fdff05d328']").hide();
});
Any pointer please. 请任何指针。 Thanks in advance.
提前致谢。
John 约翰
This is the correct method 这是正确的方法
$(document).bind('DOMNodeInserted', '#composeHeaderTable0', function(event) {
Instead of this 代替这个
$(document).on('DOMNodeInserted', '#composeHeaderTable0', function(event) {
In addition I am also able to hide/show based on other element values like this. 另外,我还可以基于其他元素值来隐藏/显示这样的内容。
$(document).bind('DOMNodeInserted', '#composeHeaderTable0', function(event) {
if ($('#data_parent_type0').val() == 'Leads') {
$("#email_template0 option[value='159a06ef-4d58-6eff-a969-52fdff05d328']").hide();
}
});
Thanks to pointers from Ritesh. 感谢Ritesh的指导。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.