How to store javascript variables in iPhone application
Posted
by sugar
on Stack Overflow
See other posts from Stack Overflow
or by sugar
Published on 2010-06-02T11:00:44Z
Indexed on
2010/06/02
11:04 UTC
Read the original article
Hit count: 361
<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
© Stack Overflow or respective owner