I have a javascript function that currently is inside a html file.. And in my xcode project I have a button linked to a UIWEBVIEW (linked to my local html file which has the javascript )..
The code inside my html file is.
<script type="text/javascript">
var now = new Date();
var day = now.getDate();
if (day % 2 == 0)
alert("Today is Day 2");
else
alert("Today is Day 1");
</script>
Currently, it's displaying what I want, but the only problem is the alert title is displaying day.html . Anyway I can use xcodes UIAlert function but with my javascript?
Here is the image: