Link to home
Start Free TrialLog in
Avatar of trance12
trance12

asked on

jobjects with javaweb

hi
  i'm trying to use jsobjects with javaweb..and get this error below

etscape.javascript.JSException
      at netscape.javascript.JSObject.getWindow(Unknown Source)
      at CRMAddNewCalendarItem$1.actionPerformed(CRMAddNewCalendarItem.java:214)
      at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
      at java.awt.Component.processMouseEvent(Unknown Source)
      at java.awt.Component.processEvent(Unknown Source)
      at java.awt.Container.processEvent(Unknown Source)


this is the code i'm using

   addItem.addActionListener( new ActionListener() {
               
                public void actionPerformed( ActionEvent e )   {
                   
                try{
                   
                   if  (lStartDueField.length() == 0)
                   {
                     JSObject win = (JSObject) JSObject.getWindow(applet);
                       win.eval("alert (\"" + "sd" + "\");");
                   }    
                    populateCalendar(conn);  
                }
                   catch( SQLException ie ) { System.out.println( ie ); }
                 
                }
   });


anyone know what i'm doing wrong
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Javascript only works in a browser, you cannot use it with jws
Avatar of trance12
trance12

ASKER

thanks..whats the alternative..??

maybe i should just design an applet to be called for javascript alerts?
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thats exactly what i wanted..optionpane..thanks heaps..:)