Link to home
Start Free TrialLog in
Avatar of Ashraf Hassanein
Ashraf Hassanein

asked on

div "with twitter class" conditional reload

I have a page of the following which is part of my web application, the page work well when you visit it for the for the first time from your browser, but when you move to other page with in the website and get back to it, it shows only the URL links rather displaying the class itself, I do not know what is the problem, I believe that the page is not reloaded again, is there away to make a conditional reload to reload the div if I return to the page again?
 
     <style>
          #twheader {
           position: fixed;
           margin-left: 5px;
           height: 100px;
           background: #fff;
           overflow-y:hidden;
           overflow-x:hidden
           }
          #twcontents {
           position: fixed;
           margin-top: 25px;
           margin-left: 5px;
           height: 700px;
           margin-left: 5px;
           background: #FFF;
           border-style:ridge;
           overflow: auto;
           }
          #twheader h3 {
           text-align: left;
           margin: 0;
           font-family:"Helvetica Neue", Helvetica, sans-serif;
           font-size: 20px;
           color: #55ACEE;
           background: #FFF;
                    }
           .ui-dialog > .ui-widget-header {
                                      text-align: left;
                                       margin: 0;
                                       font-family:"lucida grande",tahoma,verdana,arial,sans-serif;
                                       font-size: 16px;
                                       color: #FFF;
                                       background: #3B5998;
                                      }
        </style>
        <script type='text/javascript'>
          !function(d,s,id){
          var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
          if(!d.getElementById(id)){js=d.createElement(s);
          js.id=id;
          js.src=p+"://platform.twitter.com/widgets.js";
          fjs.parentNode.insertBefore(js,fjs);
          }
        }
        (document,"script","twitter-wjs");
        </script>
             <div id="twheader">
               <h3 class="ui-widget-header">&nbsp;&nbsp;twitter&nbsp;&nbsp;</h3>
              </div>
              <div id="twcontents">
                     <table><tr><td>
                      <div id="twcontents1container" style="height:100%;width:100%;">
                       <a class="twitter-timeline" href="https://twitter.com/myfeed1" data-widget-id="mywidget1">Tweets from
https://twitter.com/myuser/myfeed1</a>;
                         </div>
                       </td><td>
                       <div id="twcontents2container" style="height:100%;width:100%;">
                        <a class="twitter-timeline" href="https://twitter.com/myfeed2" data-widget-id="mywidget2">Tweets from https:/
/twitter.com/myuser/myfeed2</a>
                       </td><td>
                        <a class="twitter-timeline" href="https://twitter.com/mfeed3" data-widget-id="mywidget3">Tweets from h
ttps://twitter.com/myuser/myfeed3</a>
                        </td></tr></table>
                         </div>
              </div>

Open in new window

Avatar of Ioannis Paraskevopoulos
Ioannis Paraskevopoulos
Flag of Greece image

Hi,

do you have any live example of your page?

Giannis
You could add an onload event to the page (body) that fires the reload if the current page is the same:
if (location.href==(page URL)) {window.location.href==(page URL);}
but in this way I suspect that you will create a loop, since whenever the page is loaded its URL will correspond to the location reference.
Avatar of Ashraf Hassanein
Ashraf Hassanein

ASKER

URL: https://www.hassans.nl/test 
username/password: guest/guest
From the menu you can select twitter.

I tried to solve this reload of the page, but it does not work.
@Sar1973 but I want to reload only one dive in the page. how I can do so?
ASKER CERTIFIED SOLUTION
Avatar of Sar1973
Sar1973
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@Sat1973 thank you so much it worked pretty well.