Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hi Developers,
Thorugh HTML text area widget i'm trying out the following html code.
<!DOCTYPE html>
<html>
<head>
<title>Axeda Developer Connection Simple Ajax HelloWorld Example</title>
</head>
<body>
<h2>Radio Buttons</h2>
<form id="mySelect" onchange="myFunction()">
<input type="radio" name="gender" value="male" checked> Male<br>
<input type="radio" name="gender" value="female"> Female<br>
<input type="radio" name="gender" value="other"> Other
</form>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("mySelect").name;
var form = document.getElementById("mySelect");
console.log("Hello world!"+form.elements["gender"].value);
document.getElementById("demo").innerHTML = "You selected: " + form.elements["gender"].value;
}
</script>
</body>
</html>
It works in w3schools editor as expected like if i make a selection, then the corresponding value of the selected radio button is displayed.
But when i try the same in HTML text area widget, the script tag is not working.
The main objective is to allow the user to make a radio button selection and pass the selected value to a service or another widget outside the html text area.
Is the above use case possible with the existing html text area?
Regards,
Saran
Solved! Go to Solution.
As of ThingWorx Platform versions 8.5.0 , 8.3.10 , 8.4.6 , scripts no longer work for the HTML widgets due to security.
I think the way to do this in Thingworx is to add a List widget and set the widget property "View" equal to "Radio Button List". You need a service which binds data from an infotable to the list - for example the data could come from a Data Table or a static service.
When the user selects a row this will cause the Returned Data > Selected Row(s) on the service to change. Also the SelectedRowsChanged event will be triggered.
As of ThingWorx Platform versions 8.5.0 , 8.3.10 , 8.4.6 , scripts no longer work for the HTML widgets due to security.
Hi @SaranKarthick.
If you are satisfied that one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.
Regards.
--Sharon