cybershark
Expert Member
- Joined
- Apr 11, 2006
- Messages
- 1,319
I've got an fckeditor textarea from which I'm getting text to create keywords for the page. I'm having difficulty replacing the commons words in the keywords.
Then I'm wanting to make sure there are no duplicates in the keywords.
And finally to put the keywords in a sortable list, that's submitted as an array with the rest of the form.
Any help would really be appreciated, thanks
Then I'm wanting to make sure there are no duplicates in the keywords.
And finally to put the keywords in a sortable list, that's submitted as an array with the rest of the form.
Any help would really be appreciated, thanks
Code:
$(document).ready(function(){
$('#createkwords').bind('click', function() {
var kwords = $("#pagebody").val();
var commonWords = new Array("the", "a", "all", "for", "at", "with", "that");
kwords = kwords.replace(/<\/?[^>]+(>|$)/g,"").replace(/[.:,]/g,"");
alert(kwords);
$("#keywords").val(kwords);
});
});