WEB Codemonkeys - how can I refresh a div, and it's content, using ajax?

Discussion in 'OT Technology' started by Jesse, Apr 18, 2008.

  1. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Ideally I would like a "refresh" link to trigger this. The content of the div is a php include which displays random objects. I would like the refresh to force it to load the div again, and in turn, refresh the objects to 5 more random ones.

    I assume javascript/ajax - tried a few from google, nothing will work repeatedly. Only once, or a predefined amount of times.

    Halp
     
  2. drpepper

    drpepper Active Member

    Joined:
    Nov 13, 2006
    Messages:
    38,076
    Likes Received:
    2
    Location:
    San Antonio
    <div id="Ideally I would like a "refresh" link to trigger this. The content of the div is a php include which displays random objects. I would like the refresh to force it to load the div again, and in turn, refresh the objects to 5 more random ones.

    I assume javascript/ajax - tried a few from google, nothing will work repeatedly. Only once, or a predefined amount of times.

    Halp"></div>
     
  3. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
  4. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    See this in action on SmiliesFTW.
     
  5. Vailripper

    Vailripper Daywalkers have feelings too.

    Joined:
    Jan 25, 2006
    Messages:
    6,170
    Likes Received:
    0
    Location:
    Bellingham, WA
    FYI - prototype makes this mega easy.
     
  6. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,463
    Likes Received:
    10
    looks pretty cool but the big blank space doesn't:o
     
  7. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,463
    Likes Received:
    10
    in for filling that space with most used smilies or something
     
  8. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    There is big blank space since it has to compensate for the larger smilies. And, cuz css is semi gay.
     
  9. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,463
    Likes Received:
    10



    5 randoms I believe
     
  10. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Yep.
     
  11. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,463
    Likes Received:
    10
    working for me in FF
     
  12. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,463
    Likes Received:
    10
  13. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Works for me in FireFox, IE, and Opera. Works in Safari as far as I know.

    No real reason to change it. :dunno:
     
  14. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
  15. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    You really should not make it a habit of starting sentences with "because"
     
  16. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,463
    Likes Received:
    10

    nope just hangs like that and I still have the page open. Oh and I did notice it doesn't say done in the lower left:dunno:
     
  17. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Try now?
     
  18. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,463
    Likes Received:
    10
  19. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Redirect is working fine for me in IE7

    5 random doesn't seem to be working properly though.
     
  20. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    your shit didnt work.
     
  21. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,463
    Likes Received:
    10
    I just cleared my history and shit in IE and it is still breaking for me
     
  22. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    :dunno:

    Fuck IE.
     
  23. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,463
    Likes Received:
    10
    yea I don't use it, was just checking it out in it:o
     

Share This Page