How to store javascript variables in iPhone application
- by sugar
<script type="text/javascript">
function getSelectionRange() {
var sel;
if (window.getSelection) {
sel = window.getSelection();
if (sel.rangeCount) {
return sel.getRangeAt(0);
}
} else if (document.selection) {
return document.selection.createRange();
}
return null;
}
var range;
</script>
whatShouldBeHere=[wvText stringByEvaluatingJavaScriptFromString:@"getSelectionRange();"];
Here, method getSelectionRange is returning JavaScript Object of Range type.
How can I catch & store in plist file in iPhone application ?
Thanks in advance for sharing your knowledge.
Sagar