LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-21-2015, 02:46 PM   #1
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 20.04
Posts: 441

Rep: Reputation: 12
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>
 
Old 11-26-2015, 02:30 AM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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.

Last edited by sag47; 11-26-2015 at 02:31 AM.
 
Old 12-05-2015, 07:37 PM   #3
Tim Abracadabra
Member
 
Registered: May 2014
Location: USA, Wherever I may Roam
Distribution: debian 9.8 w/GNOME and KDE dual boot w/Win 10.| debian 7.11 w/Xfce, LFS 7.9, + Multi-boot w/Windows7
Posts: 122

Rep: Reputation: Disabled
Quote:
Code:
<!-- ============  Function showTable  =================== -->
    <!--  ignore for now
Noticed the above is missing the HTML comment termination -->

Edit: Saw the --> later in the code. Never mind.
As sag47 says, a check with a validator may help.

Tim

Last edited by Tim Abracadabra; 12-05-2015 at 11:36 PM. Reason: Correct observation and add link
 
Old 12-06-2015, 09:47 AM   #4
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
As a side note, you're misspelling Garmin, but that has nothing to do with your issue. I have no help for that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LQ page always loading. j_v LQ Suggestions & Feedback 11 10-15-2013 03:41 PM
Firefox prevented this page from automatically redirecting to another page. Aquarius_Girl General 1 07-26-2010 07:26 AM
Firefox 3.0.11 hanging when loading page into new tab catkin Linux - Software 11 08-22-2009 06:44 AM
orkut home page is not loading completely with firefox stevenbose Linux - Newbie 4 06-24-2009 07:40 AM
Page does not stop loading in firefox jackpal Linux - Software 5 04-28-2005 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration