HTML field not updated
Posted: 02 Mar 2016
Hi
I am creating a HTML script but can't find a way to define a global variable that works in and outside of my procedures, any suggestions?
Second question, since I can't manage to define a global variable I tought that I could use a html text field named "TaskId" as a workaround.
using the logic below, but altough the field is updated the IF function does not work before i enter the script again - its not updated while I am "in" the script?
$('#TaskId').attr('value', 'fant');
if (document.getElementById("TaskId").value=="fant") {alert("fant");} else {alert("fant ikke");}
I am creating a HTML script but can't find a way to define a global variable that works in and outside of my procedures, any suggestions?
Second question, since I can't manage to define a global variable I tought that I could use a html text field named "TaskId" as a workaround.
using the logic below, but altough the field is updated the IF function does not work before i enter the script again - its not updated while I am "in" the script?
$('#TaskId').attr('value', 'fant');
if (document.getElementById("TaskId").value=="fant") {alert("fant");} else {alert("fant ikke");}