I'm trying to work with a windows mobile 6.1 device running IEMobile 7.11 and I'm trying to load external javascript as such:
<html>
<head>
<script type="text/javascript" src="js/alert.js"></script>
</head>
<body><?php echo('<pre>'); print_r($_SERVER); echo('</pre>'); ?></body>
</html>
alert.js looks like this:
alert('this is included javascript');
Currently this is not appearing, however If i pull the javascript into the actual HTML page it works fine.. Is this a known issue with iemobile? I can't seem to find much on google around it.. or am I doing something wrong?
Thank you in advance.
Too late to be a useful response to the original poster I suspect, but I recently encountered the same problem. Eventually I figured out that IEMobile wasn't executing the JavaScript file because the server was sending the file with an 'application/javascript' content-type. While that's the correct mime-type for JavaScript files, and it works on earlier versions of IEMobile (which presumably ignore it entirely) some versions if IEMoblie7.11 apparently don't recognise it.
Changing your web server to send JavaScript files as 'application/x-javascript' seems to fix the problem. Being an older standard, I'd guess 'text/javascript' would also work, though I didn't try it myself.