www.webdeveloper.com
Results 1 to 3 of 3

Thread: javascript alert stopping the rest of page from rendering in php

Hybrid View

  1. #1
    Join Date
    Jun 2013
    Posts
    3

    Question javascript alert stopping the rest of page from rendering in php

    I am displaying success msg after inserting records in database in javascript alert like this:
    echo '<script type="text/javascript">
    $(document).ready(function() {
    alert("Record inserted");
    });
    </script>';
    It displays alert message after half page load and then after clicking ok in alert, rest of the page is rendering. How can I display alert message after full page load?

  2. #2
    Join Date
    Aug 2012
    Location
    TX
    Posts
    293
    move the JS to the bottom of the page. it allows the page to load visibly before executing JS

  3. #3
    Join Date
    Jun 2013
    Posts
    3
    Thanks. It will solve the problem.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles