SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Oct 2004
    Location
    IST
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loading the table content after the page loads???

    Hi to all,

    I am writing this question to this section but I am not sure it really fits here. Anyway I have a table on my upper part of the page this table's content calls to an external php file (this file refers to a javascript that counts the words on the page...) I want to call the file after the page loads for counting the words correctly. I can do this by putting the table at the bottom of the page but I want to show the content on the upper part of the page is there a way to do this by php or javascript?

    I think the code must be like php timers that says this page loads in 4.37 seconds... But I am not sure

    Any help greatly appreciated,
    Cem Louis

  2. #2
    SitePoint Addict Guimauve's Avatar
    Join Date
    Aug 2004
    Location
    Chicago
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Define the area where you want the word count to appear with a div and give it a specific id like wordCount, then at the bottom of the page add JavaScript to update the contents of that div with the word count.

    Code:
    <html>
    <body>
    <div id="wordCount"></div>
    <script>
      var wordCountDiv ;
      wordCountDiv = document.getElementById("wordCount");
      wordCountDiv.innerHTML = 'Page Contains: 1154 Words'
    </script>
    </body>

  3. #3
    SitePoint Member
    Join Date
    Oct 2004
    Location
    IST
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Guimauve,

    This didn't work... Anyway can I send you private message to solve my problem? If you have some time?

    Thank you,
    Cem Louis


Bookmarks

Posting Permissions

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