Solved

How to refresh a page

Posted on 2002-05-13
3
211 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
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 50 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

17 Experts available now in Live!

Get 1:1 Help Now