firefox - There are no scripts, but the page is still loading.
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
firefox - There are no scripts, but the page is still loading.
Hi,
When running below code I keep getting subject error message. The JSON data returned by the php file is correct and the database is populated correctly.
I checked with JAVASCRIPT 'Lint' monitor and code is ok? Code follows.
Code:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title> GPS Information from Garman GPSmap76CSx </title>
<!-- ============== styles ================ -->
<link rel="stylesheet " type="text/css" href="css/gps.css" />
<!-- ============== scripts1 ================ -->
<script type="text/javascript" src="../jquery/jquery-1.9.1.js"></script>
<body>
<script type="text/javascript">
// Since I am getting out of memory error using the <form>
// creating var and calling AJAX directly to test php response.
$(document).ready(function () {
var file="waypoints.gpx";
myAjaxCall(file);
}); // end ready
</script>
<!-- =============== html ================== -->
<div class="wrapper">
<!-- ignore for now - creates out of memory error
<div id="forms">
<p>To Down load a Garman GPX file directly to 'mymapping' database file.</p>
<p> <label for='gpxname'>Enter GPX File Name</label>
<input type="button" style="width:170px" class='hov' name='gpxname' id='gpxname'/><br>
</p>
</div>
-->
</div>
<div id="rbox" >
</div>
<!-- =============== scripts2 ================ -->
<script type="text/javascript">
// ignore for now
/*
$('#gpxname').change(function () {
var filename=$('#gpxname').val();
myAjaxCall(filename); });
*/
</script>
<!-- ============ Function showTable =================== -->
<!-- ignore for now
<script type="text/javascript">
function showTable(data) {
alert("in showTable");
}
</script>
-->
<script type="text/javascript">
<!-- ============ Function myAjaxCall =================== -->
function myAjaxCall(file) {
var request = $.ajax({
url: "error-downloadGpx.php",
type: "GET",
data: {"gpxfile":file},
dataType: "json"
});
request.done(showdata);
request.fail(function( jqXHR, textStatus ) {
alert("Request failed, see firebug."); //document.write( "Request failed: " + textStatus );
});
function showdata(data) { // shows correct data but page keeps loading???
$.each(data, function () {
$.each(this, function (key, value) {
document.write(value+", ");
}); // each
document.write("<br><br>");
}); // each
} // show
}// myAjaxCall
</script>
</body>
</html>
One thing that jumps out at me is no closing </head> tag. Though, the browser quirks mode should take care of that. Perhaps use a W3C validator to validate your HTML.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.