Hello,
Try this. Create a simple JavaScript project and add the following contents:
In your default.html file, add the following body:
<p>Content goes here</p><br />
<input type="text" id="txtShowHide" value="Show or Hide this text" /><br />
<input type="button" id="btnShowHide" value="Hide TextBox" />
In your default.js function, add the following functionality:
app.onactivated = function (args) {
......
......
args.setPromise(WinJS.UI.processAll().done(function () {
document.getElementById("btnShowHide").addEventListener("click", btnShowHideClick, false);
}));
};
function btnShowHideClick() {
if (bShow) {
document.getElementById("btnShowHide").value = "Show TextBox";
bShow = false;
document.getElementById("txtShowHide").style.visibility = "hidden";
} else {
document.getElementById("btnShowHide").value = "Hide TextBox";
bShow = true;
document.getElementById("txtShowHide").style.visibility = "visible";
}
};
Thanks,
Prashant.