Article View: pl.comp.lang.java
Article #836Re: Link z poziomu applet
From: Artur Tyloch
Date: Tue, 12 Aug 1997 17:06
Date: Tue, 12 Aug 1997 17:06
34 lines
1414 bytes
1414 bytes
Damian wrote:
>
> Pytanie jest moze trywialne ale...
> Jak z poziomu appletu spowodowac wczytanie do browsera nowej strony HTML.
>
> Damian
A moze tak: :-)
public boolean action(Event e, Object arg)
{
if (e.target instanceof Button)
{
try
{
getAppletContext().showDocument(new java.net.URL(getCodeBase()+
"tmp.html"),"_self");
/*
"_self" show in the current frame
"_parent" show in the parent frame
"_top" show in the top-most frame
"_blank" show in a new unnamed top-level window
name show in a new top-level window named name
*/
}
catch (Exception exc)
{
exc.printStackTrace();
}
return true;
}
return false;
}
Po nacisnieciu jakiegos przycisku laduje Ci sie nowa strona
Artur
Technical Details
Message-ID:
<33F097FC.1CF4@friko.onet.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!ict.pwr.wroc.pl!news.icm.edu.pl!not-for-mailReferences:
<01bca328$f5c02180$64646464@damian>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!ict.pwr.wroc.pl!news.icm.edu.pl!not-for-mail From: Artur Tyloch <arturt@friko.onet.pl> Newsgroups: pl.comp.lang.java Subject: Re: Link z poziomu applet Date: Tue, 12 Aug 1997 19:06:04 +0200 Organization: ICM Lines: 34 Message-ID: <33F097FC.1CF4@friko.onet.pl> References: <01bca328$f5c02180$64646464@damian> Reply-To: arturt@friko.onet.pl NNTP-Posting-Host: pppa149.poznan.tpnet.pl Mime-Version: 1.0 X-Mailer: Mozilla 3.01Gold (Win95; I) To: Damian <bilbo@silesia.top.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit