Hello Everyone,
I have been tolling over this for sometime now and I can't seem to find anything on google that pertains to this.
The long and the short of this is I have a form that has a single TEXTAREA contained within a hidden div. Based upon some logic this div is shown to the user with a value inserted into the TEXTAREA via javascript.
Now, there is a JavaScript wired up to the submit button that validates the TEXTAREA that it contains a comman sepearated list of email address's. The issue I am having is that, again based on some logic, the TEXTAREA may be prepopulated with a value via javascript. In IE if the user does not add any further text to the TEXTAREA and presses submit the javascript validates the information and process's the page as expected. In FireFox, however, the Javascript validation fails because it detects that the TEXTAREA is empty!
If the user types a single keystroke into TEXTAREA everything validates in FireFox without fail but, it seems FireFox is readining the TEXTAREA as having an empty value.
Here is my Javascript that I use, nothing real fancy:
Code:
function CheckBulkEmail()
{
var emailList = document.getElementById('<%=txtMultiEmail.ClientID %>').value;
var emailArray = emailList.split(',');
var regPattern =/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
for(i=0; i!=emailArray.length;i++)
{
if(!regPattern.test(emailArray[i].trim()))
{
alert('The email address ' + emailArray[i] + ' is invalid. Please correct it before continuing!');
return false;
}
}
return true;
}
Thanks!
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
__________________
===============================================
Doug Parsons
Wrox online library:
Wrox Books 24 x 7
Did someone here help you? Click

on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================