Sort text using the javascript sort() function

210 views
Skip to first unread message

Scott Ferguson

unread,
Jun 24, 2014, 10:17:13 PM6/24/14
to
Taifun has described a > very simple method < to sort text in App Inventor using the WebViewer and javascript.
This is a variation on his method which uses a small html document stored in the media list.


list.html:

<!DOCTYPE html>
<html>
<body>
<script>

   var list = eval('[' + window.AppInventor.getWebViewString() + ']');
   list.sort();
   window.document.title = list;

</script>
</body>
</html>

---
END





sort.aia
Reply all
Reply to author
Forward
0 new messages