Solved

How to refresh a page

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Microsoft is moving in-place eDiscovery & hold from ECP to EOP console under Content Search in Search and Investigation Options.  In this post, I will be showing you how to export emails to a PST file using the Content Search Options.
Popular third-party chat platforms like Slack, Discord, and Telegram are just a few of the many new productivity applications that are being hijacked by cybercriminals to create command-and-control (C&C) communications infrastructures for their malw…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
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.

726 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