J
jodleren
I have some problems, which a textarea, and I dont get it. I look
briefly here, but failed to find an answer
The code just does not work:
<body onload="documents.forms[0].elements['txtMessage'].focus();">
<- it never gets focus
<form ACTION="" METHOD="POST" name="formMain" onsubmit="return mysubmit
(this);">
and this return always true:
function mysubmit(frm)
{
if(this.submitted)
return false;
else
{
if((frm.elements['txtMessage'].Value=="") || (frm.elements
['txtMessage'].Value=="undefined"))
{
alert("The description is missing!");
return false;
}
else
{
this.submitted=true;
Submit.Disabled=true;
Submit2.Disabled=true;
return true;
}
}
}
I tried to set focus and the end of the file, and the result is the
same - my problem is clealy that I have a textarea.
WBR
Sonnich
briefly here, but failed to find an answer
The code just does not work:
<body onload="documents.forms[0].elements['txtMessage'].focus();">
<- it never gets focus
<form ACTION="" METHOD="POST" name="formMain" onsubmit="return mysubmit
(this);">
and this return always true:
function mysubmit(frm)
{
if(this.submitted)
return false;
else
{
if((frm.elements['txtMessage'].Value=="") || (frm.elements
['txtMessage'].Value=="undefined"))
{
alert("The description is missing!");
return false;
}
else
{
this.submitted=true;
Submit.Disabled=true;
Submit2.Disabled=true;
return true;
}
}
}
I tried to set focus and the end of the file, and the result is the
same - my problem is clealy that I have a textarea.
WBR
Sonnich