Spotfire (HTML + Javascript) : Update a label based on a text Area value

Hello everyone,

I'm working on Spotfire 7.11.0.

I would like to update a label value based on a text Area. The idea is : The user has to enter a path in the text Area, if the text area is empty the following text "Warning no path entered" appears inside the label "#a55b7152ac9546d3a62dee613cc7113d".

Following the associated HTML script :

Text Area : <SpotfireControl id="388a090b4e4b476c9d4e107436d735e4" />&nbsp; Label : <SpotfireControl id="a55b7152ac9546d3a62dee613cc7113d" />

My javascript script :

//Triggering the script if Drop Down selection is varied

var vt = $("#388a090b4e4b476c9d4e107436d735e4").text(); //To Capture the  selected text

if(vt===""){

$("#a55b7152ac9546d3a62dee613cc7113d").text("Warning no path entered");

}else{

$("#a55b7152ac9546d3a62dee613cc7113d").text("");

}

 

I have a problem : At first the script is excecuted, "Warning no path entered" appears in the label . When I write something in the text Area, "Warning no path entered" disappears.

The problem occurs when I clear the Text Area : "Warning no path entered" doesn't re-appears.

 

Any help would be appreciated !

 

 

Attachments

AttachmentSize
Image icon capture1.jpg38.17 KB
Image icon capture2.jpg45.72 KB

(1) Answer

Login