Reloading A Php File Everytime A Click Is Made?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Reloading A Php File Everytime A Click Is Made?

    How can I do the above, in my script everytime a I post a new topic or reply It doesnt appear untill the user personally RELOADS the page, How can I make it auto display my post or forum topic?
    Please help

    #2
    How can I do the above, in my script everytime a I post a new topic or reply It doesnt appear untill the user personally RELOADS the page, How can I make it auto display my post or forum topic?
    Please help [/b]
    You can refresh usin' metatags eg ...

    Code:
    <META HTTP-EQUIV="refresh" content="0;URL=http://www.blablabla.com/index.html" >
    Place that in your head tags

    Comment


      #3
      <head>
      <META HTTP-EQUIV="Refresh" Content="10">
      </head>

      10 being the number of seconds after refreshing, theres no need for a url at the ent but yu can av it but i dont see the point as itl do the same job
      Want something coded email me at sales@webnwaphost.com for a prices.




      Comment


        #4
        thanx 4 replying, but i ddnt help much... the first method made my script to reload every nano second... so ive now resoted to using HEADER(&#39;Location: MYURL&#39;); after all my sql queries, and it does the work so far, will now just have to come out a way to thank my visitors for posting

        Comment


          #5
          is it wml or xhtml and mayb post a page here and al av a go puting it in
          Want something coded email me at sales@webnwaphost.com for a prices.




          Comment


            #6
            This depending on what browsers are being used.

            The simplest one, that is almost certain to work on most browsers, is a standard refresh. It is suggested above that you use META-REFRESH in the headers section of your code.

            Code:
            <META HTTP-EQUIV="Refresh" Content="5">

            For it to refresh the page automatically when a new post is found or on every mouse click, you would need to use Javascript (possibly AJAX, but this may not be necessary) to check the time/date of the last message in that topic / group / category / whatever and if it differs from what you have on screen, then it tells the browser to reload the page.
            This is just one way to check for new posts, there are others.
            These checks could be done every second or every half hour - whatever you find suits best but every 30 seconds sounds reasonable to me.


            If frames are available for use (not all browsers allow you to use frames - most mobile phones do not support them, though I&#39;m unsure about newer models), then you could do exactly the same, but with a tiny frame (1x1px) reloading every 30 seconds. If it finds a new post, it could then refresh the page.



            I do not know if anybody here uses Gmail, but if you are viewing a &#39;conversation&#39; and a new message arrives, then a little message in the corner of the screen alerts you to it and you have the option of renewing the page. To me, this is a little more user-friendly, but it depends entirely upon which browser you are using and what functionality they have enabled.

            Comment

            Working...
            X