26 Jan 2007, 14:27
#1
Zen Follower
- Join Date:
- Jul 2005
- Posts:
- 392
- Plugin Contributions:
- 0
Mandatory Text Attribute
Hi Zenners,
Standard Zen Vs Javascript needed - seeking a solution to ensure that a Text Message attribute is entered mandatory by cients when they click ADD TO CART
e.g.
Enter your personal message here (Max 120 characters)...
Message [_________________________]
JavaScript we almost have working:
===============
function checkMsg(thisForm) {
var formName = thisForm.id;
var elmt = document.getElementById(formName);
var elmntVal = elmt.id[txt_5].value;
if (elmntVal == "") {
var agree=confirm("You have not entered a personal message!!\nAre you sure you wish to continue?");
if (agree) return true;
else return false;
}
else return true;
}
===============
Any JavaScript Gurus offering help?
Thanks
Standard Zen Vs Javascript needed - seeking a solution to ensure that a Text Message attribute is entered mandatory by cients when they click ADD TO CART
e.g.
Enter your personal message here (Max 120 characters)...
Message [_________________________]
JavaScript we almost have working:
===============
function checkMsg(thisForm) {
var formName = thisForm.id;
var elmt = document.getElementById(formName);
var elmntVal = elmt.id[txt_5].value;
if (elmntVal == "") {
var agree=confirm("You have not entered a personal message!!\nAre you sure you wish to continue?");
if (agree) return true;
else return false;
}
else return true;
}
===============
Any JavaScript Gurus offering help?
Thanks