SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast oneafrikan's Avatar
    Join Date
    Oct 1999
    London, Uk
    0 Post(s)
    0 Thread(s)

    refresh the contents of a window

    Hi guys

    heres the deal:

    I open a popup window - this window/page has a list of the current polls that are active (I'm using sympoll, and I'm mighty happy so far ;-), and you click on the poll title to see it - so it'll look something like this to view poll 1:


    To the problem:
    There is a More polls link at the bottom of every poll, which is supposed to open the list of polls in the same window - this links to polllist.php - so what I did was hack the link with a bit of javascript, so the link "more polls" opens the popup window, and loads polllist.php into the popup - this is fine, and works well - if anyone wants the code, I'll send it (small, but nifty in php)....

    so, what I would like to do is create another javascript function which reloads polllist.php in the popup window, and sets the page to it's default - 'cos once the "more polls" link is checked, there is no way to set the page to it's default.

    Ideally this script/function would either fetch a new copy of polllist.php from the server, or would link to polllist.php?disp=

    and thus set the page to it's default, displaying only the titles of the polls...

    at the moment I'm using reload(), but once a poll has been viewed, reload() just reloads this poll in the page...

    any ideas, or comments???

    thanks boys and girls


    btw - at 4:46 in the morning, there's an interesting thread here....

    -> ><-><><-><-><-><-><
    -> ><><-><-><-><

  2. #2
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Beyond yonder
    0 Post(s)
    0 Thread(s)
    Well, really can't help you with the default thing, but I think I can with the refresh thing.
    <meta http-equiv="refresh" content="#; URL=./poll.html">
    Replace the pound sign ('#') with how ling in seconds you want them to wait before the page refreshes, and replact the url string ('./poll.html') with your poll script. Think that'll work for you...

    ~~Hope This Helps


Posting Permissions

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