My current code is working when location is found. But I want to make a check that if location is not found, it will redirect somewhere else.
Here is my code:
<script type="text/javascript">
var userAgent = window.navigator.userAgent;
if (userAgent.match(/iPad/i) || userAgent.match(/iPhone/i)) {
window.location = "theMYApp://"
}
else
{
}
</script>
I want to check if window.location = "theMYApp://"
does not exist