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 5 of 5
  1. #1
    New Coder
    Join Date
    Oct 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    popover window that remains open even if user navigates to another page?

    Hi,

    i need to put an iframe on every single page of my website, but i dont want the content of the iframe to reload everytime the user navigates to another page. I have seen that before on some pages like Facebook chat. There you can navigate to another page and the chat window stays open without reloading. I wonder how is that accomplished because i need it so much since i have a chat too and its annoying to have it reload and log you in every time you navigate it to other page. I hope you can help me.

    Thank you.

  • #2
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    3
    Thanks
    0
    Thanked 1 Time in 1 Post

    Facebook uses AJAX

    Facebook uses AJAX specifically Ajaxify (http://max.jsrhost.com/ajaxify/) for their links which just replaces their content div innerHTML with whatever is loaded.

    If your website is simple you can use an iframe and the chat very easily
    Code:
    <!DOCTYPE html><html><head></head>
    <body>
        <iframe src="main_content.php"></iframe>
        <div id="chat"></div>
    </body></html>

  • #3
    New Coder
    Join Date
    Oct 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tried that once long time ago. It didnt work because my site is a board and all the links become a real mess. My chat is in an iframe, the problem is that the user goes to another page the chat will reload, thus forcing the user to login which sucks. My site is a board very similar to this one. Imagine you put a chat in an iframe embedded right below the header. How would you do so when you click on a topic or any other link the iframe with the chat stays the same and only the rest of the page changes?
    Last edited by supercain; 10-10-2012 at 05:45 AM.

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,441
    Thanks
    76
    Thanked 4,372 Times in 4,337 Posts
    An obvious answer is to use true <frame>s instead of an <iframe>.

    The chat is in one <frame>. The forum board is in the other <frame>. When you change forum content, you do it by loading a different page into the forum's <frame> and the chat <frame> is undisturbed.

    Old fashioned, maybe, but it works.

    Failing that, you'll just have to use two separate windows.
    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.

  • #5
    New Coder
    Join Date
    Oct 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Could you put this board in a frame and a chat in other? People will complain if they have to navigate a board that is encapsulated inside a div or iframe. I cant definitively change the structure of my site. It has to stay as it is but with the div container below the header that contains the chat. Is it impossible then?


  •  

    Posting Permissions

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