Hi everyone,
this is my first time when i am using FCKeditor and i have some problem while doing validation on textareas.
I am checking if that textarea is blank then alert should come for filling the text area and its coming but when i am clicking ok button of alert box it should focus to that text area if i am using focus function but its not focusing to that text area.
what should i do please tell me if anybody knows about this prob.
I am giving code that i am using...
this is my first time when i am using FCKeditor and i have some problem while doing validation on textareas.
I am checking if that textarea is blank then alert should come for filling the text area and its coming but when i am clicking ok button of alert box it should focus to that text area if i am using focus function but its not focusing to that text area.
what should i do please tell me if anybody knows about this prob.
I am giving code that i am using...
Code:
function form_validate_inclass()
{
var valid=true;
var location1 = FCKeditorAPI.GetInstance('location_info'); //location_info is name of text area.
var contents = location1.GetXHTML(true);
if(!contents)
{
alert("Please enter location information");
location1.Focus();
var valid=false;
}
return valid;
}
Comment