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 / General / May 2006

Tip: Looking for answers? Try searching our database.

problem with showDocument

Thread view: 
SimonSimon - 02 May 2006 23:05 GMT
Hello,

I can't make method showDocument to work.

This works:
applet.getAppletContext().showDocument(new
URL("http://www.google.com"), "_self");

But I want to show page from my disk:
applet.getAppletContext().showDocument(new URL(getCodeBase() +
"PanoramaTrain.html"), "_self");
This does not work, it just don't show any page.

Please help, i am in hurry :(
andrewthommo@gmail.com - 03 May 2006 00:26 GMT
..
> I can't make method showDocument to work.

What with pop-up blockers, you simply cannot
rely on showDocument to work out on the real
World Wide Web at all.

> This works:
> applet.getAppletContext().showDocument(new
[quoted text clipped - 4 lines]
> "PanoramaTrain.html"), "_self");
> This does not work, it just don't show any page.

Did you check the Java console of your browser?

> Please help, i am in hurry :(

Please pay money for consultancy if it is urgent.
OTOH, this is usenet, so 'cool your jets, Sparky'.

Andrew T.
Mickey Segal - 03 May 2006 01:55 GMT
> What with pop-up blockers, you simply cannot
> rely on showDocument to work out on the real
> World Wide Web at all.

Andrew's warning is a good one - he and I spent a lot of time dealing with
the pop-up blocker issue.  Since I use signed applets I was able to find a
good workaround, but otherwise it is hard to rely on using showDocument.
Mickey Segal - 03 May 2006 01:53 GMT
> But I want to show page from my disk:
> applet.getAppletContext().showDocument(new URL(getCodeBase() +
> "PanoramaTrain.html"), "_self");

I can think of two possible problems:
1.  File name format - your form may be right but be sure to check.
2.  Sometimes you need "Mark of the Web" in your files, which requires a
line like:
<!-- saved from url=(0028)http://www.company_name.com/ -->
to be placed at the start of your HTML file that you want to pop up (the
0028 is the total of characters in the string so if the URL is longer it
needs to be a higher number).  I forget when you really need this but this
was one of the workarounds that people needed for some situations when
Windows XP SP2 came out.  Searching on "Mark of the Web" should give more
details.
SimonSimon - 03 May 2006 13:20 GMT
hello,

i just can't figure it out. Is there maybe another method to change
document in a browser?

Greetings
Andrew T. - 05 May 2006 04:34 GMT
...
> i just can't figure it out. Is there maybe another method to change
> document in a browser?

No other method is necessary for *your* browser.  The problem here
is almost certainly security, since your applet (in your browser) can
showDocument a page on the net without problems.

Andrew T.


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.