|
There are 2 ways to acheive this,
you can use JSObject in your java program to call java
script function(I am not sure if this will work from
AS400, i use it in applet)
other way is to use
STRPCCMD
from you CL to open HTML page or website in java
script, I use this to open HTML from AS400,
DCL VAR(&COMMAND) TYPE(*CHAR) LEN(30)
VALUE('cmd.exe /c start www.venkateshwaramusicals.com/
')
STRPCO
MONMSG MSGID(CPF0000 MCH0000)
STRPCCMD PCCMD(&COMMAND) PAUSE(*NO)
--- Jack Williams <bcijack@xxxxxxxxxxxxx> wrote:
> I am very new to JAVA. I have a java script that
> accepts a parameter that
> is a url and does an window.open with many
> parameters. The script works
> fine inside a html document. I'd like to call this
> 'function' from an RPGLE
> program. This will allow me to open a url in
> internet explorer from a green
> screen application controlling the window. I don't
> know of any way to call
> a javascript. I've tried to move it to a .java
> object on the 400 and
> compile it. While I can compile and execute the
> 'helloworld' example on the
> 400, I can't get the syntax right for this small
> function.
>
>
>
> ANY HELP would be appreciated.
>
>
>
> Here is the html source with the javascript in it.
>
>
>
> <html>
>
> <head>
>
> <script type="text/javascript">
>
> function open_win(theurl)
>
> {
>
> window.open(theurl,"_blank","toolbar=no,
> location=no, directories=no,
> status=no, menubar=no, scrollbars=no, resizable=no,
> copyhistory=yes,
> left=10, width=760, height=360");
>
> }
>
> </script>
>
> </head>
>
> <body>
>
> <form>
>
> <input type="button"
>
> onclick="open_win('http://www.google.com')"
>
> value="Open url">
>
> </form>
>
> </body>
>
> </html>
>
>
>
>
>
>
>
> Jack
>
>
>
>
>
>
>
> --
> This is the Java Programming on and around the
> iSeries / AS400 (JAVA400-L) mailing list
> To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit:
> http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/java400-l.
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.