在Spotfire中实现Javascript
我有一个下拉列表,有两个值(“开始”和“结束”)。对于此下拉值的条件,我希望显示特定的DIV或其他DIV 我试图实现以下代码,但它不起作用。当我更改下拉输入中的值时,什么都没有发生 下拉id为:5e64c4918c4b473a8ed1c55264aca3d9 HTML代码:在Spotfire中实现Javascript,javascript,jquery,python,html,spotfire,Javascript,Jquery,Python,Html,Spotfire,我有一个下拉列表,有两个值(“开始”和“结束”)。对于此下拉值的条件,我希望显示特定的DIV或其他DIV 我试图实现以下代码,但它不起作用。当我更改下拉输入中的值时,什么都没有发生 下拉id为:5e64c4918c4b473a8ed1c55264aca3d9 HTML代码: <P align=left><FONT size=2>Choice : <SpotfireControl id="5e64c4918c4b473a8ed1c55264aca3d9" />&
<P align=left><FONT size=2>Choice : <SpotfireControl id="5e64c4918c4b473a8ed1c55264aca3d9" /> </FONT>
<DIV id="div1"><FONT size=2>List 1 : </FONT> <SpotfireControl id="5f252f7f373d48debc33bfde6fd7dd65" /> </DIV>
<DIV id="div2"><FONT size=2>List 2 :</FONT> <SpotfireControl id="136584e6f10143c9ade2a82f5cf4fef0" /></DIV>
<P>
<P align=left> </P>
<P align=left> </P>
<P align=left> </P>
<P><SpotfireControl id="42a0fbc386184501903389b4c48155a5" /></P>
我还创建了一个iron python脚本,链接到我的下拉列表:
Ironpython脚本:
from Spotfire.Dxp.Application.Visuals import HtmlTextArea
ta.As[HtmlTextArea]().HtmlContent += " "
其中ta是“可视化”类型的输入
你能帮我吗
由于on.click不受支持,我已删除on.click语句,该语句正在运行,请提前感谢
//Triggering the script if Drop Down selection is varied
var value = $("#5e64c4918c4b473a8ed1c55264aca3d9").val(); //To capture the index
var vt = $("#5e64c4918c4b473a8ed1c55264aca3d9").text(); //To Capture the selected text
if(vt== "START") //If the Drop Down selected value is Enable
{
$("#div1").show(); //Making the Input Box visible
$("#div2").hide();
}else{
$("#div1").hide(); //Making the Input box element hidden
$("#div2").show();
};
//Triggering the script if Drop Down selection is varied
var value = $("#5e64c4918c4b473a8ed1c55264aca3d9").val(); //To capture the index
var vt = $("#5e64c4918c4b473a8ed1c55264aca3d9").text(); //To Capture the selected text
if(vt== "START") //If the Drop Down selected value is Enable
{
$("#div1").show(); //Making the Input Box visible
$("#div2").hide();
}else{
$("#div1").hide(); //Making the Input box element hidden
$("#div2").show();
};