[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

div "with twitter class" conditional reload

Posted on 2014-01-20
6
Medium Priority
?
519 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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 2000 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

Industry Leaders: 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!

Question has a verified solution.

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

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…
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…
Suggested Courses

649 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