Solved

div "with twitter class" conditional reload

Posted on 2014-01-20
6
513 Views
Last Modified: 2014-02-03
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

0
Comment
Question by:Ashraf Hassanein
  • 3
  • 2
6 Comments
 
LVL 23

Expert Comment

by:Ioannis Paraskevopoulos
ID: 39796352
Hi,

do you have any live example of your page?

Giannis
0
 
LVL 9

Expert Comment

by:Sar1973
ID: 39796555
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.
0
 

Author Comment

by:Ashraf Hassanein
ID: 39814386
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Ashraf Hassanein
ID: 39818225
@Sar1973 but I want to reload only one dive in the page. how I can do so?
0
 
LVL 9

Accepted Solution

by:
Sar1973 earned 500 total points
ID: 39820371
You could assign the event to the div instead of the page.
0
 

Author Comment

by:Ashraf Hassanein
ID: 39829893
@Sat1973 thank you so much it worked pretty well.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP: Filling Out/Creating a PDF 29 93
Coding for the first time 9 62
Bootstrap question 4 26
Building JSON/JQuery Results Display 11 20
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question