1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can i refresh a specific part on page?

Discussion in 'Cloaking and Content Generators' started by Metaton, Dec 16, 2014.

  1. Metaton

    Metaton Newbie

    Joined:
    May 22, 2014
    Messages:
    20
    Likes Received:
    0
    Soo like if i only want the ads to refresh on my page but if i wrrite it like
    <head>
    <meta http-equiv="refresh" content="0">
    </head>

    It refresh the whole webpage... So any idea how to refresh a specific part of the webpage?
    Like i make a table with an ad inside of it and its refreshing...
     
  2. dirtyshoes

    dirtyshoes Newbie

    Joined:
    Feb 12, 2011
    Messages:
    21
    Likes Received:
    3
    I am a software developer and you cannot do it. If you want to refresh only part of a page then you have to enclose that part of the page in an iframe.

    Check w3schools iframe on Google :)
     
  3. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,495
    Likes Received:
    11,193
    Occupation:
    CHEAP
    Location:
    DATASETS
    Home Page:
    You need an Ajax call. Look at jQuery it has a method specifically for this purpose.
     
  4. Eri001

    Eri001 Newbie

    Joined:
    Dec 6, 2014
    Messages:
    23
    Likes Received:
    1
    Only with iframe. I will give you an example


     
    Last edited: Dec 17, 2014
  5. Eri001

    Eri001 Newbie

    Joined:
    Dec 6, 2014
    Messages:
    23
    Likes Received:
    1
    Or you can use this code inside iframe.php
     
    Last edited: Dec 17, 2014
  6. rico2014

    rico2014 Newbie

    Joined:
    Mar 11, 2014
    Messages:
    20
    Likes Received:
    2
    You can refresh a specific part of a page with ajax. if you would like me to help show you how. let me know more details am a web developer and am sure you can
     
    • Thanks Thanks x 1
  7. yogyogi

    yogyogi Registered Member

    Joined:
    Nov 30, 2014
    Messages:
    53
    Likes Received:
    4
    Occupation:
    Website Developer in asp.net, wordpress and SEO
    Location:
    New York, USA
    Here you will need the help of ajax. You can refresh a specific area like an area inside any div with the help of jquery ajax. It's a very powerful thing and very easy to learn too.
     
  8. dorasdr

    dorasdr Regular Member

    Joined:
    Feb 2, 2014
    Messages:
    477
    Likes Received:
    115
    Create a div like below
    <div id="refresh_this">your content</div>
    Use ajax call get the required content assgn the same to DIV like below
    document.getElementById('refresh_this').innerHTML = your ajax page response

    Hope it helps you little bit
     
  9. stonedmonkey

    stonedmonkey Registered Member

    Joined:
    Nov 4, 2014
    Messages:
    76
    Likes Received:
    7
    If it is only a particular section of a web page requiring a refresh from the client side with running a javascript code already on your page then you do not need to use AJAX... AJAX is for sure the answer should the refresh require calls from server to run algo's and/or info pulled from a database... So you could write the code to be in javascript which executes every xx seconds looping around and then calling the code which then displays the ads... Something like this would be a start....

    //currently set to execute every one second
    var myVar=setInterval(function () {myTimer()}, 1000);

    function myTimer() {
    var d = new Date();
    document.getElementById("demo").innerHTML = d.toLocaleTimeString();
    //e.g. call the code here which runs the ad display...
    }

    Noting that you can call this function within the body tag of your html e.g.

    <body onload="myTimer()">

    And further the refresh element is enclosed by the correct id tag holding it e.g.

    <div id="demo">

    <!-- here is where your ads are located--->

    </div>
     
    Last edited: Dec 19, 2014
  10. faisalmaximus

    faisalmaximus Jr. VIP Jr. VIP

    Joined:
    Apr 6, 2013
    Messages:
    738
    Likes Received:
    82
    Occupation:
    Online Marketer
    Home Page:
    This can be done using ajax, same way the email provider refreshes their inbox and other folders.
     
  11. saltedweb

    saltedweb Junior Member

    Joined:
    Aug 9, 2014
    Messages:
    118
    Likes Received:
    2
    w3schools i frame use plz
     
  12. andreaklarin

    andreaklarin Jr. VIP Jr. VIP

    Joined:
    Jun 23, 2015
    Messages:
    157
    Likes Received:
    17
    My Reference to you is to use ajax.

    The Function should be built fetching the current page due to ajax, but no to the whole page, only the division of question from the server. Then the data will be put inside the same division in question and will be replaced to the new one by th old one.

    Good Luck.
     
  13. abbeywil

    abbeywil Newbie

    Joined:
    Jan 7, 2016
    Messages:
    34
    Likes Received:
    3
    Hi,
    You can refresh a particular page but you cannot refresh a particular part of a page....