Hello Everyone i have this problem and really don't know how to solve it: i'm using Textext tool to my website ,i type all my tags in the textarea but when i need the tags i can't get them here is my code:
html code:
<textarea id="tagsa" rows="1" cols="70" style="color: black;" placeholder="Add Your Article Tags.. Max=7" ></textarea>
and here is my textext jquery code:
function checkLength() {
if ($("#tagsa").next().children().length < 7) {
return true;
}
return false;
}
$('#tagsa').textext({
plugins: ' prompt autocomplete ajax arrow clear suggestions tags',
prompt: 'Add one...',
ajax: {
url: '../data.json',
dataType: 'json',
cacheResults: true
},
tagsItems: eval(get_suggestion()),
//eval(get_suggestion()),
ext: {
tags: {
addTags: function (tags) {
if (checkLength()) {
$.fn.textext.TextExtTags.prototype.addTags.apply(this, arguments);
}
else
alert("Only 7 Tags Allowed");
}
}
}
}).bind('tagClick', function (e, tag, value, callback) {
var url = "Finder.aspx?tag=" + value;
window.location = url;
}).bind('isTagAllowed', function (e, data) {
var formData = $(e.target).textext()[0].tags()._formData,
list = eval(formData);
// duplicate checking
if (formData.length && list.indexOf(data.tag) >= 0) {
data.result = false;
}
});
i tried this:
alert(document.getElementById("tagsa").value)
but it doesn't show me the inner text/tags
can any one help me with this?