Refresh content in a div

Discussion in 'HTML & Website Design' started by mark_s, Nov 30, 2006.

  1. #1
    I have a shoutbox with a 'Refresh' button that is currently in an iFrame due to this function.

    Is there any way I can get the content of this shoutbox to refresh without having to have it in an iFrame? ... like refreshing the content in a div?
     
    mark_s, Nov 30, 2006 IP
  2. the_pm

    the_pm Peon

    Messages:
    332
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What's feeding the <div>? If you're feeding it with data onscreen, you can probably use a simple JavaScript to update a box. If it's being fed with data from the server, it's AJAX to the rescue :)
     
    the_pm, Nov 30, 2006 IP
  3. mark_s

    mark_s Peon

    Messages:
    497
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It is a php include being fed from an SMF database o0

    Please can you tell me where I should start looking to get AJAX to help me make this refresh button do what I want?
     
    mark_s, Dec 1, 2006 IP
  4. totoros

    totoros Peon

    Messages:
    528
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Do a search on google for AJAX tutorial and you should find some basic info on how AJAX works and it will take you through making something in AJAX. You should be able to apply the same concept to your shoutbox using javascript.
     
    totoros, Dec 1, 2006 IP
  5. mark_s

    mark_s Peon

    Messages:
    497
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I find this quite complicated... can someone not supply me with some code for a button that will refresh the contents of a php include?
     
    mark_s, Dec 2, 2006 IP