Search Results

Search found 3012 results on 121 pages for 'refresh'.

Page 10/121 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • iframe/lightbox refresh issues

    - by user96828
    Hi Please check out: http://gherkin.co.nz/refresh/ and click on the purple box that says 'Membership chest' You should then see some form fields in an iframe in the lightbox. If you click on the "GO" button, the page will change (currently Not found, which is fine for now). If you click the dark area to close the box, then click the purple card again - it will take you back to the not found page. When called, I want the content to always go back to the page specified in the iframe src, not the last page. Can it go back to the first specified page on this second click? Does that make sense? basically I want the iframe/lightbox to refresh its content each time it is called.

    Read the article

  • PHP auto refresh page without losing user input

    - by Tony
    I'm working on a PHP collaboration software project. I have a page that shows the latest updates from other users who are adding content to the database, but also has a form input to allow the user to enter text. I am currently using this code to refresh the page automatically every 30 seconds: header('Refresh: 30'); The problem is that the header code refreshes the entire page, and not just what is pulled from the database. Is there any PHP code that will just pull any new data from the database without refreshing the entire page? If someone could point me in the right direction I'd appreciate it.

    Read the article

  • How to refresh an activity?

    - by poeschlorn
    Hi Guys, after implementing some Android Apps, including several Map activities, I try to refresh the activity when the GPS listener's onLocationChanged() mehtod is called. I have no Idea how to tell the map activity to refresh on its own and display the new coords... the coords to store will have to be in global values, so that the location listener will have access to it. In my sample GPS-class (see code below) I just changed the text of a text view....but how to do that in map view? private class MyLocationListener implements LocationListener { @Override public void onLocationChanged(Location loc) { final TextView tv = (TextView) findViewById(R.id.myTextView); if (loc != null) { tv.setText("Location changed : Lat: " + loc.getLatitude() + " Lng: " + loc.getLongitude()); } } I think the solution of this Problem won't be very difficult, but I just need the beginning ;-) This whole app shall work like a really simple navigation system. It would be great if someone could help me a little bit further :) nice greetings, Poeschlorn

    Read the article

  • iphone refresh images UIImageView

    - by Rick
    I have a rather basic question. I have several(5) UIImageView images on my screen. When I click a button, I want to change each image to something else. I also want to play a sound as each image is changed. So I basically want a clicking sound as each image changes. The problem is, for some reason if I have say 5 images, the sound gets played 5 times first and then the images change. It's like the images only refresh when control goes back to the user for input. How can I "force" it to refresh the images as soon as i tell it what image to display? I'm new to the iphone/macworld, so go easy on me :-) Rick

    Read the article

  • IE downloads and installs CAB dialog popup upon every page refresh

    I have a signed cab on an aspx page. I am seeing the following inconsistent behavior. Any insights would be highly appreciated. On some machines, the cab is downloaded and installed on every page refresh. On few of those machines, the IE "install cab" dialog pops up on every page refresh, while on the others it pops up only once. Additional info: The CAB contains a .NET DLL The CAB is slightly large (around 30 MB), hence recurring download behavior is a pain Target browsers are IE6 and IE7, and the behavior is common to both!

    Read the article

  • How refresh a DrawingArea in PyGTK ?

    - by Lialon
    I have an interface created with Glade. It contains a DrawingArea and buttons. I tried to create a Thread to refresh every X time my Canva. After a few seconds, I get error messages like: "X Window Server 0.0", "Fatal Error IO 11" Here is my code : import pygtk pygtk.require("2.0") import gtk import Canvas import threading as T import time import Map gtk.gdk.threads_init() class Interface(object): class ThreadCanvas(T.Thread): """Thread to display the map""" def __init__(self, interface): T.Thread.__init__(self) self.interface = interface self.started = True self.start() def run(self): while self.started: time.sleep(2) self.interface.on_canvas_expose_event() def stop(self): self.started = False def __init__(self): self.interface = gtk.Builder() self.interface.add_from_file("interface.glade") #Map self.map = Map.Map(2,2) #Canva self.canvas = Canvas.MyCanvas(self.interface.get_object("canvas"),self.game) self.interface.connect_signals(self) #Thread Canvas self.render = self.ThreadCanvas(self) def on_btnChange_clicked(self, widget): #Change map self.map.change() def on_interface_destroy(self, widget): self.render.stop() self.render.join() self.render._Thread__stop() gtk.main_quit() def on_canvas_expose_event(self): st = time.time() self.canvas.update(self.map) et = time.time() print "Canvas refresh in : %f times" %(et-st) def main(self): gtk.main() How can i fix these errors ?

    Read the article

  • How to refresh a fragment in a viewpager?

    - by aut_silvia
    I know there are already some questions to this problem. But I am really new in Android and ecspecially to Fragments and Viewpager. Pls have passion with me. I didn't found a answer which fits to my code. I dont know how to refresh a fragment or reload it when it's "active" again. TabsPagerAdapter.java: public class TabsPagerAdapter extends FragmentPagerAdapter{ public TabsPagerAdapter(FragmentManager fm){ super(fm); } @Override public Fragment getItem(int index) { switch (index) { case 0: return new KFZFragment(); case 1: return new LogFragment(); case 2: return new TrackFragment(); } return null; } @Override public int getCount() { // get item count - equal to number of tabs return 3; } } I have this 3 Fragments (KFZFragment,LogFragment,TrackFragment) and on the TrackFragment I calculate some data and this data should be display in a ListView in LogFragment. But when I change to LogFragment it's not the latest data. So it doesnt refresh. Now how should I modify my code to refresh the fragments when it's "active"? MainActivityFragment.java: public class MainActivityFragment extends FragmentActivity implements ActionBar.TabListener{ private ViewPager viewPager; private TabsPagerAdapter mAdapter; private ActionBar actionBar; List<Fragment> fragments; private String[] tabs = { "KFZ", "Fahrten Log", "Kosten Track" }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_fragment); // Initilization viewPager = (ViewPager) findViewById(R.id.pager); actionBar = getActionBar(); mAdapter = new TabsPagerAdapter(getSupportFragmentManager()); fragments = new Vector<Fragment>(); fragments.add(Fragment.instantiate(this, KFZFragment.class.getName(),savedInstanceState)); fragments.add(Fragment.instantiate(this, LogFragment.class.getName(),savedInstanceState)); viewPager.setAdapter(mAdapter); actionBar.setHomeButtonEnabled(false); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); // Adding Tabs for (String tab_name : tabs) { actionBar.addTab(actionBar.newTab().setText(tab_name) .setTabListener(this)); } viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageSelected(int position) { // on changing the page // make respected tab selected actionBar.setSelectedNavigationItem(position); } @Override public void onPageScrolled(int arg0, float arg1, int arg2) { } @Override public void onPageScrollStateChanged(int arg0) { } }); } @Override public void onTabReselected(Tab tab, FragmentTransaction ft) { // TODO Auto-generated method stub } @Override public void onTabSelected(Tab tab, FragmentTransaction ft) { viewPager.setCurrentItem(tab.getPosition()); } @Override public void onTabUnselected(Tab tab, FragmentTransaction ft) { // TODO Auto-generated method stub } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { } return super.onKeyDown(keyCode, event); } } Pls help me out.

    Read the article

  • TinyMCE refresh issue

    - by Luke
    I'm using TinyMCE, witch is working fine for the most part... when the user saves the page redirects to a a php page that extracts the textfield data and processes it, i wont elaborate cause that's no t the issue... the issue is that when it redirects back to the page... the textfield is blank and i can click on it but not see anything, if i type it enters(but i can't see it), this also happens when i go to the address directly, the only way i can see it is to hit the refresh button... i tried a meta refresh to the page... i tried disabling cache... any ideas would be great... thanks in advance

    Read the article

  • Refresh combo box in Windows Form VB.NET

    - by fireBand
    Following is the code to populate combobox using DataSource Dim CountryList As Array = MyCtrl.GetAllCountries With cbCountyList .DataSource = CountryList .DisplayMember = "CountryName" .ValueMember = "CountryID" End With After adding a new COuntry Name to Database I want to reflect the changes in combobox. Repeating this code is not an option becasue it triggers SelectIndexChange event and had to do some crappy work around to avoid that. So I was wondering if there is way to refresh the combobox list. I actually thought binding with the DataSource property supposed to do it automatically. I also tried cbCountyList.Refresh() Thanks in advance.

    Read the article

  • form data posted using linq-to-sql not showing until I refresh the page

    - by PeteShack
    I have an asp.net mvc app with a form. When you submit the form, it adds records to the sql database with linq-to-sql. After adding the records, the controller displays the form again, and should show those new values on the form. But, when it displays the form, the values are blank, until you refresh the page. While tracing through the code, I can see the records being added to the database when they are submitted, but the view doesnt display them, unless I refresh. The view is not the problem, it just displays the view model, which is missing the new records immediately after the post. I know this is kind of vague, but wasnt sure what parts of code to include here. Could this have something to do with data context life cycle? Basically, there is a data context created when the form is posted, then a different data context is created in the method that displays the form. Any suggestions on what might be causing this?

    Read the article

  • mvc - how to avoid log out when refresh a page

    - by user235973457
    I have built the MVC application with WCF service. The major problem I have experienced with refreshing page. I have created a login page with session (username and password). But when you refresh the home page by pressing F5, it would automatically log out. That is my problem. I need to stay the home page after refresh. I have been googling around to find a solution but it seems not helpful. Any idea? Your advise or code example much appreciated.

    Read the article

  • Trying to get paperclip to refresh or reprocess..

    - by Trip
    I have over time, changed the size for thumbs of the class Deal. Through these changes, users were uploading to the site, so there are few people who have different sized thumbs. I wanted to reprocress or refresh these, so I went to into my root and typed: $ rake paperclip:refresh class=Deal Did nothing for the thumb sizes.. Then I : irb Deal.find(987).reprocess! Returned this : NoMethodError: undefined method `reprocess!' for #<Deal:0xb68a0988> from /data/HQ_Channel/releases/20100607130346/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:260:in `method_missing' from (irb):7 My deal class is this : => Deal(id: integer, organization_id: integer, deal: string, value: string, what: string, description: string, image_file_name: string, image_content_type: string, image_file_size: integer, image_updated_at: datetime, created_at: datetime, updated_at: datetime, deal_image_file_name: string, deal_image_content_type: string, deal_image_file_size: integer, deal_image_uploaded_at: datetime) What can i do to have it reprocess the original to make the thumb the correct size in the current thumb size params?

    Read the article

  • Jquery incrementing number +1 0n page refresh.

    - by sameast
    Hi guys i am trying to modify this code here. $(document).ready(function() { var randomImages = ['img-1','img-2','img-3','img-4']; var rndNum = Math.floor(Math.random() * randomImages.length); $("div#bg-image").css({ background: "url(http://example.com/images/" + randomImages[rndNum] + ".jpg) no-repeat" }); }); This works fine and gives me a random image each time which is great but what i need is for the image to increment +1 each time on page refresh. This is because sometimes i can refresh 3 times and will still get the same image show when using Math.random(). I need to cancel the random and set +1 each time. Any help

    Read the article

  • Can I force my video card to work in a certain refresh rate?

    - by EFanZh
    I have a GeForce GT 640 video card, but by default the screen flickers badly. And if I change the refresh rate to 59 Hz in NVIDIA Control Panel manually, everything is OK. I don't know why. Now the problem is, if the system restarts, the refresh rate become 60Hz, then the screen flicker is flickering. I need to change the refresh rate again. Can I keep the refresh rate to 59 Hz? Or it would be better if the screen doesn't flicker at 60 Hz.

    Read the article

  • Is there anyway to prevent onbeforeunload event from triggering when using internet explorer

    - by newName
    I have a function that is suppose to trigger when user closes their browser and I have put the code in the "window.onbeforeunload" function. The thing is every time if I reloads the page in Internet Explorer, the onbeforeunload event will also trigger which is a problem because I only wants it to trigger only when the user closes or navigates away from the current page but not on a page refresh/reload. Therefore I'm not sure if onbeforeunload is intended to trigger even on a page refresh/reload and if it is intended to, then is there another way to work round it? Thanks

    Read the article

  • [jquery/javascript] Trigger function when mouse click inside textarea AND type stop typing...

    - by marc
    Welcome, In short, my website use BBcode system, and i want allow users to preview message without posting it. I'm using JQuery library. I need 3 actions. 1) When user click in textarea i want display DIV what will contain preview, i want animate opening. 2) When user typing, i want dynamical load parsed by PHP code to DIV. (i'm still thinking what will be best option... refresh every 2 seconds, or maybe we can detect and refresh after 1 second of inactivity [stop typing]) 3) When user click outside textarea i want close preview div with animation. For example the PHP parser will have patch /api/parser.php and variable by POST called $_POST['message']. Any idea my digital friends ?

    Read the article

  • Refresh Button in java

    - by lakshmi
    I need to make a simple refresh button for a gui java program I have the button made but its not working properly. I just am not sure what the code needs to be to make the button work. Any help would be really appreciated.I figured the code below ` public class CompanySample extends Panel { DBServiceAsync dbService = GWT.create(DBService.class); Panel panel = new Panel(); public Panel CompanySampledetails(com.viji.example.domain.Record trec, int count) { panel.setWidth(800); Panel borderPanel = new Panel(); Panel centerPanel = new Panel(); final FormPanel formPanel = new FormPanel(); formPanel.setFrame(true); formPanel.setLabelAlign(Position.LEFT); formPanel.setPaddings(5); formPanel.setWidth(800); final Panel inner = new Panel(); inner.setLayout(new ColumnLayout()); Panel columnOne = new Panel(); columnOne.setLayout(new FitLayout()); GridPanel gridPanel = null; if (gridPanel != null) { gridPanel.getView().refresh(); gridPanel.clear(); } gridPanel = new SampleGrid(trec); gridPanel.setHeight(450); gridPanel.setTitle("Company Data"); final RowSelectionModel sm = new RowSelectionModel(true); sm.addListener(new RowSelectionListenerAdapter() { public void onRowSelect(RowSelectionModel sm, int rowIndex, Record record) { formPanel.getForm().loadRecord(record); } }); gridPanel.setSelectionModel(sm); gridPanel.doOnRender(new Function() { public void execute() { sm.selectFirstRow(); } }, 10); columnOne.add(gridPanel); inner.add(columnOne, new ColumnLayoutData(0.6)); final FieldSet fieldSet = new FieldSet(); fieldSet.setLabelWidth(90); fieldSet.setTitle("company Details"); fieldSet.setAutoHeight(true); fieldSet.setBorder(false); final TextField txtcompanyname = new TextField("Name", "companyname", 120); final TextField txtcompanyaddress = new TextField("Address", "companyaddress", 120); final TextField txtcompanyid = new TextField("Id", "companyid", 120); txtcompanyid.setVisible(false); fieldSet.add(txtcompanyid); fieldSet.add(txtcompanyname); fieldSet.add(txtcompanyaddress); final Button addButton = new Button(); final Button deleteButton = new Button(); final Button modifyButton = new Button(); final Button refeshButton = new Button(); addButton.setText("Add"); deleteButton.setText("Delete"); modifyButton.setText("Modify"); refeshButton.setText("Refresh"); fieldSet.add(addButton); fieldSet.add(deleteButton); fieldSet.add(modifyButton); fieldSet.add(refeshButton); final ButtonListenerAdapter buttonClickListener = new ButtonListenerAdapter() { public void onClick(Button button, EventObject e) { if (button == refeshButton) { sendDataToServ("Refresh"); } } }; addButton.addListener(new ButtonListenerAdapter() { @Override public void onClick(Button button, EventObject e) { if (button.getText().equals("Add")) { sendDataToServer("Add"); } } private void sendDataToServer(String action) { String txtcnameToServer = txtcompanyname.getText().trim(); String txtcaddressToServer = txtcompanyaddress.getText().trim(); if (txtcnameToServer.trim().equals("") || txtcaddressToServer.trim().equals("")) { Window .alert("Incomplete Data. Fill/Select all the needed fields"); action = "Nothing"; } AsyncCallback ascallback = new AsyncCallback<String>() { @Override public void onFailure(Throwable caught) { Window.alert("Record not inserted"); } @Override public void onSuccess(String result) { Window.alert("Record inserted"); } }; if (action.trim().equals("Add")) { System.out.println("Before insertServer"); dbService.insertCompany(txtcnameToServer, txtcaddressToServer, ascallback); } } }); deleteButton.addListener(new ButtonListenerAdapter() { @Override public void onClick(Button button, EventObject e) { if (button.getText().equals("Delete")) { sendDataToServer("Delete"); } } private void sendDataToServer(String action) { String txtcidToServer = txtcompanyid.getText().trim(); String txtcnameToServer = txtcompanyname.getText().trim(); String txtcaddressToServer = txtcompanyaddress.getText().trim(); if (!action.equals("Delete")) { if (txtcidToServer.trim().equals("") || txtcnameToServer.trim().equals("") || txtcaddressToServer.trim().equals("")) { Window .alert("Incomplete Data. Fill/Select all the needed fields"); action = "Nothing"; } } else if (txtcidToServer.trim().equals("")) { Window.alert("Doesn't deleted any row"); } AsyncCallback ascallback = new AsyncCallback<String>() { @Override public void onFailure(Throwable caught) { // TODO Auto-generated method stub Window.alert("Record not deleted"); } @Override public void onSuccess(String result) { Window.alert("Record deleted"); } }; if (action.trim().equals("Delete")) { System.out.println("Before deleteServer"); dbService.deleteCompany(Integer.parseInt(txtcidToServer), ascallback); } } }); modifyButton.addListener(new ButtonListenerAdapter() { @Override public void onClick(Button button, EventObject e) { if (button.getText().equals("Modify")) { sendDataToServer("Modify"); } } private void sendDataToServer(String action) { // TODO Auto-generated method stub System.out.println("ACTION :----->" + action); String txtcidToServer = txtcompanyid.getText().trim(); String txtcnameToServer = txtcompanyname.getText().trim(); String txtcaddressToServer = txtcompanyaddress.getText().trim(); if (txtcnameToServer.trim().equals("") || txtcaddressToServer.trim().equals("")) { Window .alert("Incomplete Data. Fill/Select all the needed fields"); action = "Nothing"; } AsyncCallback ascallback = new AsyncCallback<String>() { @Override public void onFailure(Throwable caught) { Window.alert("Record not Updated"); } @Override public void onSuccess(String result) { Window.alert("Record Updated"); } }; if (action.equals("Modify")) { System.out.println("Before UpdateServer"); dbService.modifyCompany(Integer.parseInt(txtcidToServer), txtcnameToServer, txtcaddressToServer, ascallback); } } }); inner.add(new PaddedPanel(fieldSet, 0, 10, 0, 0), new ColumnLayoutData( 0.4)); formPanel.add(inner); borderPanel.add(centerPanel, new BorderLayoutData(RegionPosition.CENTER)); centerPanel.add(formPanel); panel.add(borderPanel); return panel; } public void sendDataToServ(String action) { AsyncCallback<com.viji.example.domain.Record> callback = new AsyncCallback<com.viji.example.domain.Record>() { @Override public void onFailure(Throwable caught) { System.out.println("Failure"); } public void onSuccess(com.viji.example.domain.Record result) { CompanySampledetails(result, 1); } }; dbService.getRecords(callback); } } class SampleGrid extends GridPanel { private static BaseColumnConfig[] columns = new BaseColumnConfig[] { new ColumnConfig("Name", "companyname", 120, true), new ColumnConfig("Address", "companyaddress", 120, true), }; private static RecordDef recordDef = new RecordDef(new FieldDef[] { new IntegerFieldDef("companyid"), new StringFieldDef("companyname"), new StringFieldDef("companyaddress") }); public SampleGrid(com.viji.example.domain.Record trec) { Object[][] data = new Object[0][];// getCompanyDataSmall(); MemoryProxy proxy = new MemoryProxy(data); ArrayReader reader = new ArrayReader(recordDef); Store store = new SimpleStore(new String[] { "companyid", "companyname", "companyaddress" }, new Object[0][]); store.load(); ArrayList<Company> Companydetails = trec.getCompanydetails(); for (int i = 0; i < Companydetails.size(); i++) { Company company = Companydetails.get(i); store.add(recordDef.createRecord(new Object[] { company.getCompanyid(), company.getCompanyName(), company.getCompanyaddress() })); } store.commitChanges(); setStore(store); ColumnModel columnModel = new ColumnModel(columns); setColumnModel(columnModel); } } `

    Read the article

  • IE8 Inconsistent Rendering when Reloading

    - by leeand00
    I am working on fixing a website that doesn't work in the new release of IE8. After a bit I found out that you can force IE8 to render as IE7 with the following meta tag: <!-- Meta tag for IE8 so that it always displays the site in IE7 Compatibility mode --> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> I have found that although the page loads fine when you specify this meta-tag; However, when you click or press the refresh button after the initial load of the page, the page renders completely wrong (see bellow): This really seems like an IE8 bug to me, as I've never seen any other browser render inconstantly on a page refresh. As anyone else noticed this? Update! This was cause by having CompanionJS installed in IE8.

    Read the article

  • Trigger function when mouse click inside textarea AND type stop typing...

    - by marc
    Welcome, In short, my website use BBcode system, and i want allow users to preview message without posting it. I'm using JQuery library. I need 3 actions. 1) When user click in textarea i want display DIV what will contain preview, i want animate opening. 2) When user typing, i want dynamical load parsed by PHP code to DIV. (i'm still thinking what will be best option... refresh every 2 seconds, or maybe we can detect and refresh after 1 second of inactivity [stop typing]) 3) When user click outside textarea i want close preview div with animation. For example the PHP parser will have patch /api/parser.php and variable by POST called $_POST['message']. Any idea my digital friends ?

    Read the article

  • value was "" blank when refreshing the page manually

    - by crisgomez
    Hi, I have a problem regarding the maintaining of value when page was refresh.I assign a value into a hidden control using javascript below: function displaytab(tabID) { var tabId = document.getElementById("ctl00_MainContent_tabId"); switch (tabID) { case 1: tabId.value=1; break; case 2: tabId.value=2; break; case 3: tabId.value=3; break; default: tabId.value=0; break; } but when i refresh the page the value was ("") blank. Is there any way how to resolved this issue? or what is the best way to do this?

    Read the article

  • jQuery, Forms, Browser Refreshes

    - by Eric Cope
    I have a large form with some fields values dependent on previous elements. I use jquery's .trigger event to trigger the dependent field's update functions. When I refresh the page (click reload or click back), the previous values selected are still there, but the dependent fields are not reflecting the other element's values. How can I trigger the update functions upon refresh? I saw a way to prevent the browser from using the form's cached values. I'd rather use the cached values and update the elements dependent on the elements with cached values.

    Read the article

  • What requests do browsers' "F5" and "Ctrl + F5" refreshes generate?

    - by Morgan Cheng
    Is there a standard for what actions F5 and Ctrl+F5 trigger in web browsers? I once did experiment in IE6 and Firefox 2.x. The "F5" refresh would trigger a HTTP request sent to the server with an "If-Modified-Since" header, while "Ctrl+F5" would not have such a header. In my understanding, F5 will try to utilize cached content as much as possible, while "Ctrl+F5" is intended to abandon all cached content and just retrieve all content from the servers again. But today, I noticed that in some of the latest browsers (Chrome, IE8) it doesn't work in this way anymore. Both "F5" and "Ctrl+F5" send the "If-Modified-Since" header. So how is this supposed to work, or (if there is no standard) how do the major browsers differ in how they implement these refresh features?

    Read the article

  • Reusing OAuth request token when user refresh page - Twitter4j on GAE

    - by Tahir Akram
    Hi I am using Twitter4J API on GAE/J. I want to use the request token when user came to my page. (called back URL). And press refresh button. I write following code for that. But When user press refresh button. I got Authentication credentials error. Please see the stacktrance. It works fine when user first time used that token. HomeServlet.java code: HttpSession session = request.getSession(); twitter.setOAuthConsumer(FFConstants.CONSUMER_KEY, FFConstants.CONSUMER_SECRET); String token = (String) session.getAttribute("token"); String authorizedToken = (String)session.getAttribute("authorizedToken"); User user = null; if (!token.equals(authorizedToken)){ AccessToken accessToken = twitter.getOAuthAccessToken( token, (String) session .getAttribute("tokenSecret")); twitter.setOAuthAccessToken(accessToken); user = twitter.verifyCredentials(); session.setAttribute("authorizedToken", token); session.setAttribute("user", user); }else{ user = (User)session.getAttribute("user"); } TwitterUser twitterUser = new TwitterUser(); twitterUser.setFollowersCount(user.getFollowersCount()); twitterUser.setFriendsCount(user.getFriendsCount()); twitterUser.setFullName(user.getName()); twitterUser.setScreenName(user.getScreenName()); twitterUser.setLocation(user.getLocation()); Please suggest how I can do that. I have seen on many website. They retain the user with the same token. Even if user press browser refresh buttion again and again. Please help. Exception stacktrace: Reason: twitter4j.TwitterException: 401:Authentication credentials were missing or incorrect. /friends/ids.xml This method requires authentication. at twitter4j.http.HttpClient.httpRequest(HttpClient.java:469) at twitter4j.http.HttpClient.get(HttpClient.java:412) at twitter4j.Twitter.get(Twitter.java:276) at twitter4j.Twitter.get(Twitter.java:228) at twitter4j.Twitter.getFriendsIDs(Twitter.java:1819) at com.tff.servlet.HomeServlet.doGet(HomeServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5233) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363) at com.google.net.rpc.impl.Server$2.run(Server.java:838) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:536) at com.google.net.rpc.impl.Server.startRpc(Server.java:793) at com.google.net.rpc.impl.Server.processRequest(Server.java:368) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:448) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java:466) at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:759) at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:205) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101) at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251) at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:394) at java.lang.Thread.run(Unknown Source)

    Read the article

  • Get data from database without refresh whole page

    - by stefanz
    Hello everybody. My project is about a school admin I have a page called : createClass.php, where user inserts grade, profile etc. When he press "submit" page called createdClass.php is loading. Inside this page I have all code which insert data into database and also an "if" structure which says : "Class already exists" if in database is another class with same specifications. Also in second page (createdClass.php) i have a small table which shows the place of each student. First time all cells are green (this means that place is free) and if i click one of them appear a popup window which let me to add info about student from that place. If a place is busy the cell will be red (take a look here : http://screencast.com/t/NzM2YzYxNjct). The big problem is that the cell will be red only after refresh the page (the place ask for data from database). If I press refresh appears "class already exists". To test the code i added in a comment all lines which verify and add respectively classroom . I think my problem can be solved with ajax. I'm waiting for an answer. Regards Stefan

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >