Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    how to reload a website without reloading of main content ?

    how can refresh my website without interrupting of main content. suppose user reading a post in my website .
    during that i want to refresh my ads in my website without interrupting of main content.
    ex: go this link. http://www.novamov.com/video/xl58zuy4sd1a9
    in this page site will automatically refreshes the ads
    every 1 minute without interrupting of main content.

    how can i do that in same manner. please help me.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,596
    Thanks
    80
    Thanked 4,631 Times in 4,594 Posts
    AJAX.

    Pure and simple.

    Start here:

    http://www.w3schools.com/ajax/default.asp
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,596
    Thanks
    80
    Thanked 4,631 Times in 4,594 Posts
    Though another way is to put the ads into <iframe>s and then simply refresh the <iframe> contents.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    Banned
    Join Date
    Apr 2011
    Posts
    656
    Thanks
    14
    Thanked 69 Times in 69 Posts
    You could use setInterval() to periodically reset link hrefs, img src's etc etc depending on how your ads are being displayed originally.

  • #5
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    i just need reload content in <div> where ads placed in my html widget.

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,596
    Thanks
    80
    Thanked 4,631 Times in 4,594 Posts
    Quote Originally Posted by freeinfo.in View Post
    i just need reload content in <div> where ads placed in my html widget.
    Yes? So did you look at the AJAX tutorial I referred you to? That's the only practical way, if you don't want to use <iframe>s. (You could easily put an <iframe> into each of your ad <div>s and then just refresh the <iframe>s if you don't want to use AJAX.)
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    freeinfo.in (03-23-2012)


  •  

    Posting Permissions

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