I'm trying to develop a simple script that reads the words of a string, and compare with a dictionary .txt, .dic...
or an Array Collection of correct words.
The format of my string is like this:
<data>
<value>Exmple</value>
</data>
<data>
<value>Boxx</value>
</data>
<data>
<value>Softvare</value>
</data>
<data>
<value>Adres</value>
</data>
He can only apply the fix on the words that you have within the <value>
tag.
What he would have me return should be the same structure with the words corrected. This Form.
<data>
<value>Example</value>
</data>
<data>
<value>Box</value>
</data>
<data>
<value>Software</value>
</data>
<data>
<value>Adress</value>
</data>
I'm trying to get at first this result using some combinations .replace()
My application will run on a system without internet access. So I need to do something that does not require access to any web service, which requires consultation or at some other file linguaguem. So precisso be developing this checker in jquery / javascript PURE! Is it possible to do this? If yes how can I be doing in my code? Example?
$('button').click(function () {
var code = $('textarea[name=message]').val();
if ($('#output').length < 1) {
$("body").append('<h2>Output</h2><textarea id="output" rows="10" cols="100"></textarea>');
}
$('#output').val(code);
});
My English is bad I hope my question has been clear and can be understood by you.