473,218 Members | 1,824 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,218 software developers and data experts.

textarea focus while javascript validation using fckeditor

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...

Expand|Select|Wrap|Line Numbers
  1. function form_validate_inclass()
  2. {
  4.     var valid=true;
  6.     var location1 = FCKeditorAPI.GetInstance('location_info');    //location_info is name of text area.
  7.     var contents = location1.GetXHTML(true);
  9.         if(!contents)
  10.         {
  11.             alert("Please enter location information");
  12.             location1.Focus();
  13.             var valid=false;
  14.         }
  15.         return valid;
  16. }
May 1 '09 #1
1 5859
16,027 Expert Mod 8TB
focus() should be lower-case.
May 1 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: 'bonehead | last post by:
Greetings, I'm still something of a newbie to html/php/mysql. I have a php/html form with several fields of type "input". If the user enters improper data in a particular field and clicks the...
by: lawrence | last post by:
How to add text to a textarea using javascript? Apparently this is a popular question, because when I run the search on google, there are a lot of returns: ...
by: daniel kaplan | last post by:
hello all, am new to HTML and am in the process of creating a form, no serious headaches, but am stumped on two types of fields. i can take care of these situations using javascript, but was...
by: ahres | last post by:
I'm using Stephen Poley's javascript form validation for a relatively simple form, but have encountered a tricky situation wherein the textarea field is frozen in IE5. When clicking in the textarea...
by: ED M. | last post by:
Hello all...I'm new to the board. I have a problem that I hope someone here might be able to solve for me. I am doing some clientside validation using Javascript. The text I am testing is...
by: tranky | last post by:
Hola boys, i've a question for you! It's possible to highlight some text inside a textarea? (not all text, but a portion!) For example, i've this text inside a textarea. INSERISCI TESTO i...
by: Keith Bentrup | last post by:
Hi all, I wrote a simple search function to find text in a textarea where not all the text is visible (ie. the text box displays 10 lines but there may be more than 1000 lines to search). I can...
by: deneb | last post by:
Hello everyone, I know this isn't related to generic javascript but I didn't found a group dedicated to the FCKEditor. I'm sorry for the inconvenience. I'm desperately trying to set the focus...
AMT India
by: AMT India | last post by:
Hi, I am using FckEditor.It works well.But the problem is that when I insert a "textarea" using source edit,the FCK editor not showing the elements after the textarea.Is this because this...
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.