What are the limitations to JavaScript in a UIWebView?
Ive tried a couple of simple scripts to get the hang of what goes and what doesnt, and here are my results:
1. Write text. Works fine
----------------------------
2. Alert-box. Does NOT work
--------------------------------
3. Function in header. Does NOT work
-------------------------------------------
Ive tried a couple of simple scripts to get the hang of what goes and what doesnt, and here are my results:
1. Write text. Works fine
----------------------------
Code:
<html><head>
<script type="text/javascript">
document.write("Hello Macworld!");
</script>
</body></html>
2. Alert-box. Does NOT work
--------------------------------
Code:
<html><head>
<script type="text/javascript">
alert("Hello Macworld!");
</script>
</body></html>
3. Function in header. Does NOT work
-------------------------------------------
Code:
<html><head>
<script type="text/javascript">
function message()
{
alert("This alert box was called with the onload event");
}
</script>
</head>
<body onload="message()">
</body></html>