• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Calling Javascript functions from an applet

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ps: My code dosnt actually contain smileys!
they are supposed to be
'colon'openLeftMonitor...
and
'colon'document.write....



E
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic