× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Well I wasn't thinking of RPG being called, but consider this.

You use the target (or whatever that keyword is) to open the hRef in a
new windows. That hRef calls the CGI program and displays the HTML
generated bye the CGI. Then you have a window with your user selection
choices or whatever it is in there. Or perhaps nothing.

The CGI program writes the cookie out, and also sends some HTML to the
StdOut.
That HTML is simply a short HTML that will close itself (hence closing
the new window) and therefore return you to the call's window.

Not the part I'd have to lookup...
Upon resuming in the original window, there is probably an event that
would need to be detected and a second JavaScript could be used to then
read the cookie written by the RPG program. I'm thinking of an OnFocus()
event or something like that.

Something like that might work.

Bob Cozzi
cozzi@rpgiv.com
Visit the on-line  Midrange  Developer  forum at: http://www.rpgiv.com


> -----Original Message-----
> From: web400-admin@midrange.com [mailto:web400-admin@midrange.com] On
Behalf
> Of Richard B Baird
> Sent: Wednesday, February 13, 2002 2:19 PM
> To: web400@midrange.com
> Subject: RE: [WEB400] call an rpg program to return a true/false value
in
> javascript
>
>
> Bob,
>
> I'm intrigued,  I can write a cookie in rpg, and read it in javascript
sure
> enough, but to call the rpg program to write it is the sticky part.
>
> by simply hrefing a cgi program, the browser will expect a new page to
be
> loaded.  right?
>
> if you can get around this, i'm all ears!
>
> the way I ended up doing it was to have the program reload the page,
after
> deciding the true/false condition and loading the appropriate
javascript
> already imbedded, to run onload.  not as elegant as I would have
liked, but
> functional.
>
> thanks,
>
> rick
>
>
> ---original message---
> If I'm late or repeating someone else's solution excuse me but...
> Couldn't you just write a cookie out and then read it back in the
> JavaScript?
>
> Bob Cozzi
> cozzi@rpgiv.com
> Visit the on-line  Midrange  Developer  forum at: http://www.rpgiv.com
>
>
>
> _______________________________________________
> This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
> To post a message email: WEB400@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/web400
> or email: WEB400-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/web400.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.