Solved

div "with twitter class" conditional reload

Posted on 2014-01-20
6
505 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now