Find the following function begining at line 485 in file inc_code.js. Add the statements in red as shown. Let me know if it works.
function validate(){
if (document.PostTopic.Subject) {
if (trim(document.PostTopic.Subject.value)=="") {
alert("You must enter a Subject")
return false
}
}
if (document.PostTopic.Message) {
if (trim(document.PostTopic.Message.value)=="") {
alert("You must enter a Message")
return false
}
}
document.PostTopic.Submit.disabled=true;
document.PostTopic.Submit.value='Please Wait...';
document.PostTopic.Submit.style.cursor='wait';
return true
}
function validate(){
if (document.PostTopic.Subject) {
if (trim(document.PostTopic.Subject.value)=="") {
alert("éù ìäæéï ðåùà...")
return false
}
}
if (document.PostTopic.Message) {
if (trim(document.PostTopic.Message.value)=="") {
alert("éù ìäæéï àú úåëï ääåãòä...")
return false
}
}
document.PostTopic.Submit.disabled=true;
document.PostTopic.Submit.value='Please Wait...';
document.PostTopic.Submit.style.cursor='wait';
return true
}
function ResetForm(form) {
var where_to= confirm("Do you really want to Reset the Form Fields?");
if (where_to== true) {
form.reset();
}
}
//code below found here: http://www.marzie.com/devtools/javascript/functions.asp
function ltrim(s) {
return s.replace( /^\s*/, "" );
}
function rtrim(s) {
return s.replace( /\s*$/, "" );
}
function trim ( s ) {
return rtrim(ltrim(s));
}
hi~ zbenggg, just try it again! GauravBhabu's code work great for me... (thx! GB ) i also can't think about why it wo'nt work for you.....
maybe let us know what's the detail of "not work" situation... and also try posting a blank message or blank topic subject. to see if the popup alert window show or not.