myBad.script
07-02-2004, 05:06 PM
I want a message to pop up on the screen when the user clicks the 'Submit' button on a simple email form. I copied the code right out of the mm help file, and converted it to work on click instead of focus out. I get the trace message, but no alert.
function messageNull(){
if (tf_message.length<1) {
Alert(_root, "Error", "You must enter something in the message field", mxModal | mxOK);
trace("message function called");
}
}
bt_submit.addEventListener("click",messageNull);
Same result (trace, but no Alert) when I attach the function directly to the button:
on(release){
messageNull.call();
}
(The website I'm working on is coming along fine - client is pleased, almost all functions are working properly....thanks for all your help. I may get good() at this yet.)
(Originally posted in the F/MX forum, but as this is component related it was suggested I try posting in this forum)
function messageNull(){
if (tf_message.length<1) {
Alert(_root, "Error", "You must enter something in the message field", mxModal | mxOK);
trace("message function called");
}
}
bt_submit.addEventListener("click",messageNull);
Same result (trace, but no Alert) when I attach the function directly to the button:
on(release){
messageNull.call();
}
(The website I'm working on is coming along fine - client is pleased, almost all functions are working properly....thanks for all your help. I may get good() at this yet.)
(Originally posted in the F/MX forum, but as this is component related it was suggested I try posting in this forum)