Discussion Forums
- Topic List
- Most Recent Posts
- Sign In for more options
Hi,
Oops...!!! In that case you have to first identify that what exactly id get generating your fck textbox..
You can find id using firebug or using view source..!
I'm asking this Bcoz as you said that you are reaching up to following msg
alert(‘dsadsa’);
But I guess due to improper id which you mentioned in the var objFckEditor = document.getElementById(‘deal_head_line’); you caught that "null". So, please find what is id ofyour fck textbox.. then apply same id in getElementById()..
Don't mind but I guess you are new in the web-dev.. either should have to have clear all the basic of js, css and use of various browser and its related tool.. As programmer many times we get stuck up with these types issues but should have to learn these basics and imp is to learn tricks/techniques to resolve it.
Also post here if you find any alternative to resolve this issue.. So that it will be helpful for others issues..
Good Luck ;)
-Ganesh
Hi ganesh , i have used var objFckEditor = document.getElementById(‘deal_head_line’); still its returns "null" Even i entered value in headline
Hi lucky..
just replace your following syntax..
var objFckEditor = getElementById('deal_head_line');
Use : var objFckEditor = document.getElementById('deal_head_line');
I hope it will work for this time.. I usually work with jQuery so not that good in simple javascript..
For more information and syntax of js follow this ( http://www.w3schools.com/js/default.asp ) tutorial.
Good Luck ;)
-Ganesh
Hi, i have given code in application.js is
alert('dsadsa'); var objFckEditor = getElementById('deal_head_line'); if(objFckEditor.value == "") {
alert("Head line cant be blank..");
return false;
} alert('1111')
My html code is 'Easy', :width => '100%', :height => '200px') %> while submiting form call the above jvascript code there giving alert('dsadsa'); only .didnot move to nextline
Please help me
lucky when you say its not working, please be more specific. See if you're getting any javascript errors. Use Firebug, that should help a lot.
Maybe this link will help? http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/JavaScript_API
Hi Ganesh ,
Thanks for your response .It's not working .Could you please suggest other alternatives
Hi Lucky,
In the above case for the validation you can access element value by its ID.
for above syntax code will be like...
Try above function.. I hope it will help you.
Good Luck ;)
-Ganesh
Hi i was mentioned as in my view page is
'Easy', :width => '100%', :height => '200px') %>
how to get the value into javescript. Iwant to do javascript validations for this Please help me on this
