?
Solved

How to refresh a page

Posted on 2002-05-13
3
Medium Priority
?
218 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

764 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