I'm looking for a way to call out the user's city within the alert script, I have tried document.write but I'm no coder and spent several hours to no avail. I can use
<span id="city">{cityname}</span>
on the page itself, but cannot get it to work in the alert script.
<head>
<script type="text/javascript" src="http://www.jsgeoip.com/geoip.js"> </script>
</head>
<body>
<script>
$(document).ready(function() {
$('#city').html(geoip_city());
});
</script>
<script>alert('Welcome CITY HERE User');</script>
</body>