How can i turn my regular chatroom to footer chat?

Discussion in 'HTML & Website Design' started by toykin2010, Mar 18, 2011.

  1. #1
    i want to create add a chatroom in my footer tab. i want it to click open and click close likefacebook chat help anyone?
     
    toykin2010, Mar 18, 2011 IP
  2. Automagick

    Automagick Greenhorn

    Messages:
    22
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    23
    #2
    you could use 2 layers, with different contents.

    1 layer will have the "collapsed" state (which would be a little bar with links to open or similar) while the other layer is hidden.
    When you click on the "Chat Now" button/link, you will hide the bar and show the chat layer itself.


    Technically, you need to use 2 DIVs, this way:

    
    <div id="chat_bar" style="position:fixed; bottom:0px; text-align:center;">
       <!-- bar contents, like a table with the background image and the links -->
       <a href="javascript:void(0);" onclick="document.getElementById('chat_bar').style.display='none'; document.getElementById('chat_layer').style.display='block';">Chat Now</a>
    </div>
    
    <div id="chat_layer" style="position:fixed; bottom:0px; text-align:center;">
      <!-- chat layer with chat app -->
    <a href="javascript:void(0);" onclick="document.getElementById('chat_layer').style.display='none'; document.getElementById('chat_bar').style.display='block';">Close Chat Window</a>
    </div>
    
    Code (markup):
    This way, you will be hiding the bar and showing the chat app and viceversa, if closing the chat window.

    I hope this was helpful.

    Regards
     
    Automagick, Mar 18, 2011 IP