Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / March 2004

Tip: Looking for answers? Try searching our database.

html links within an applet

Thread view: 
RoS - 29 Mar 2004 23:20 GMT
Is it possible to embed a hyperlink in a Swing based applet, so that
clicking on this link would open a corresponding site in a new browser
window?
Thanks in advance

Roman
Andrew Thompson - 29 Mar 2004 23:32 GMT
> Is it possible to embed a hyperlink in a Swing based applet, so that
> clicking on this link would open a corresponding site in a new browser
> window?

Yes, no and maybe.  

In the same browser window.  Yes, easy.
In a new browser window, almost impossible
to do in a reliable way.  
(Besides that, new browser windows are
evil, and not in a nice way.)

Signature

Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology

Rob Jones - 31 Mar 2004 10:42 GMT
>> Is it possible to embed a hyperlink in a Swing based applet, so that
>> clicking on this link would open a corresponding site in a new browser
[quoted text clipped - 7 lines]
> (Besides that, new browser windows are
> evil, and not in a nice way.)

Try adding a target=....
inside the anchor tag
Andrew Thompson - 31 Mar 2004 11:52 GMT
>> In the same browser window.  Yes, easy.
>> In a new browser window, almost impossible
>> to do in a reliable way.  
..
> Try adding a target=....
> inside the anchor tag

And I will reiterate, this is very unreliable.

Browser manufacturers are starting to
give control to users (damn them) allowing
the user to allow/vet/suppress pop-ups.

Signature

Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology

Rob Jones - 31 Mar 2004 15:51 GMT
>>> In the same browser window.  Yes, easy.
>>> In a new browser window, almost impossible
[quoted text clipped - 8 lines]
> give control to users (damn them) allowing
> the user to allow/vet/suppress pop-ups.

Unreliable, for the internet as a whole, I agree yes.
But then to a lesser degree so is implementing an applet.
(Different JVM versions in browsers, OS, even Java being
turned off by the user).
Using target=... might well be the best solution for Ros
eg If the applet is within a controlled intranet environment
in which things like 'allow popups for internal/specified
domains' is mandated by corporate policy.

BTW: The default behaviour for Mozilla's pop up blocker appears
to be that pop ups through Javascript are killed but new windows
caused by target=... are allowed. Not that this is guaranteed to
stay this way.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.