wood burning stoves 2.0*
The moose likes Applets and the fly likes Calling Javascript functions from an applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Calling Javascript functions from an applet" Watch "Calling Javascript functions from an applet" New topic
Author

Calling Javascript functions from an applet

Eoin Mac Aoidh
Ranch Hand

Joined: May 19, 2005
Posts: 48
Hi all,

I am having a problem calling two separate javascript functions from an applet at the same time.
I can call them both separately, but not together.
My applet should take some arguments in from an applet (as a string), then create a html page from the string and display it in a separate window.

The first function is to open a page in a new window:


The function is defined in a .js file

This works fine where mainpage.htm exists in the same directory which the applet is running from.

The second function is to create a html page from a string:


This successfully creates and displays a page from a string.
There is also a second, alternative function to do the same thing:

This also successfully creates and displays a page from a string.

Now I need to open the page created from the string in a new window by combining the functions. I have tried lots of things here such as:


but nothing seems to work.
If anyone has an idea how to combine two javascript functions like this it would be a big help.


Thanks.


Eoin.
[ July 20, 2007: Message edited by: Eoin Mac Aoidh ]
Eoin Mac Aoidh
Ranch Hand

Joined: May 19, 2005
Posts: 48
Ps: My code dosnt actually contain smileys!
they are supposed to be
'colon'openLeftMonitor...
and
'colon'document.write....



E
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
Originally posted by Eoin Mac Aoidh:
Ps: My code dosnt actually contain smileys!

We know.

It's because those particular smileys are triggered by the character sequences ":o" and ":D", which your post happened to contain.

You can turn off smilies by checking the "Disable smilies in this post" checkbox when posting.
[ July 20, 2007: Message edited by: Ulf Dittmer ]

Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling Javascript functions from an applet
 
Similar Threads
Controlling applet from html code
pop up window to display an array object
opening new browser window from applet
Windows XP Popup blocking
pop up window to display an array object using Tomcat