In the below code how can i make it load the file into a textarea where textarea path is parent.a.frame_name1.document.form_name1.textarea_name1
Replace the lines
if (!/(\.txt)$/i.test(obj.value)) {
alert("Local file name must include the '.txt' extension.");
return false;
}
with
if (!/(\.txt|\.htm|\.html)$/i.test(obj.value)) {
alert("Local file name must include the '.txt', '.htm' or '.html' extension.");
return false;
}
For your convenience, it now takes htm-files as well.