| Author |
Open JDialog from Javascript?
|
Herbert Kornfeld
Ranch Hand
Joined: Apr 16, 2003
Posts: 32
|
|
Hi, What I am trying to do is open a JDialog from javascript in an html page. I have found code to do this and I am 90% there in that I can bring up the dialog from a javascript function - the problem is that when the dialog is visible there is an hourglass and you can't edit anything within the dialog - and then the browser just becomes hung. So, my code is thus - I have a hidden applet in the html page: import java.applet.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.tree.*; import javax.swing.border.*; import java.util.*; public class HiddenApplet extends JApplet { public HiddenApplet() { } public void openAddKeyword() { System.out.println("called in method"); AddKeywordsDialog d = new AddKeywordsDialog(); d.center(d); d.show(); d.setVisible(true); System.out.println("called in method out"); } } Then in my html page I have: function call_java() { document.hiddenapplet.openAddKeyword(); } and: applet applet code="HiddenApplet" width = 10 height = 10 name = "hiddenapplet" applet and then I call the calljava method from a submit button (please use your imagination - I had to take out the arrow characters so I could post) Many Thanks
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 12511
|
|
|
Moving this to the HTML and JavaScript forum.
|
One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
|
 |
 |
|
|
subject: Open JDialog from Javascript?
|
|
|