Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to refresh a page

Posted on 2002-05-13
3
Medium Priority
?
219 Views
Last Modified: 2010-04-01
Hi, all

I would like to create a site for the chatting. Users can join a chat group by openning a new window from a parent page. The new window uses applet for message sending. The parent page shows the number of online users. When a user joins a chatting group, the database is updated to add 1 to the onlineNum.

In the java file used for the applet, I need to fresh the parent page when a user join a group. How can I make it refresh when a user is added to the listbox of user? I have try the following code:

lstUser.parent.parent.refresh();

But it doesn't work. Please help me to fix it. Thanks.
0
Comment
Question by:CodeLover
[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 Comments
 
LVL 4

Expert Comment

by:pellep
ID: 7006235
var URL=lstUser.parent.parent.document.location;
lstUser.parent.parent.document.location=URL;
0
 

Author Comment

by:CodeLover
ID: 7007196
Hi, pellep

I need the codes for java file, not JavaScript. The lstUser is a component of an Applet.
0
 
LVL 1

Accepted Solution

by:
raid999 earned 200 total points
ID: 7010528
What you can do is add a button when that button is clicked the data will be fetched again from the database and then redisplay every thing again and this should show the new data.

Something like this:
refreshButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        fetchData(dataSource);//here you fetch from database
        mainArea.repaint();//here your redisplay every thing.
      }
    });
0

Featured Post

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.

Question has a verified solution.

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

One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

609 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