Hi all,
I’ve got a question about an input field and readonly="yes"
After a webuser is logged in he can add a date via a popup-calender. The result is put in a field with id="date_from". If he wants to change the format of the date he can click on a link that sets the readonly to false (readOnly = false), but whenever this little javascript executes, modx redirects to the homepage instead of staying on the same page.
function checkCnt(prm) { //prm = from
var itemId = document.getElementById(’date_’+prm);
var itemVal = itemId.value;
if (itemVal != "") {
itemId.readOnly = false;
alert("choose another format");
}
}
Any solutions??? There’s no redirect in the script.
Thanks.