You may have problems because of the JSObject.  I believe it only works in
Netscape and outlook probably uses IE as the default.

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of job job
Sent: Friday, July 07, 2000 9:15 PM
To: [EMAIL PROTECTED]
Subject: Navigation from Applets in MS Outlook


I'm trying to navigate on click of an applet button in Outlook Mail,
but get no response - I expect the lauch of a new browser window, but
no luck.

Any suggestions?

The button code is included below:

import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import netscape.javascript.JSObject;
import java.net.*;

public class OutLook extends Applet implements ActionListener
{
  String target = "_self";
  public void init()
   {
     Button b = new Button("Click This Button");
            b.addActionListener(this);
            add(b);
    }

 public void actionPerformed(ActionEvent e)
   {

         try{
        URL dest = new URL("http://www.yahoo.com");
        JSObject win = JSObject.getWindow(this);
        if( win == null )
        target = "_blank";
        this.getAppletContext().showDocument(dest, target);
       } catch(MalformedURLException a) {}
   }

}

Thanks for the help.

Rahul



__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to