× 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.



If I understand this right the main page is in a domain different than the
domain that contains the CGI-program.



In such scenario it really doesn’t matter if the main page is on IBM I or
on another platform. For the browser it is two different domains and that
means that the browsers same-origins policy kicks in.



If both domains is on the same IBM I the easiest what is to make a
<directory> that points to the CGI-library in the main page server
configuration or you can get data from any other URI using HTTPAPI, GETURL
or java/PHP etc. that all will turn the IBM I into a web client for any
domain and you will need a proxy (CGI) program that acts as a proxy in
between.



If the main domain is on another machine you need cross domain support in
the browser if the main page machine doesn’t have a proxy like the above.



If you want to handle the problem in the browser the easy way is to use
JSONP. JSONP is not a W3C standard but is a way in OO javascript to cheat
the browsers same-origins policy. In practice you will need a client side
framework such as jQuery or EXT JS that has built in classes for JSONP.
SJONP may also require the server to be able to pass answers in JSON.



Some has mentioned websockets. Websockets is a complete different
bidirectional (PUSH/PULL) and persistent (no polling) TCP protocol that
only shares the HEADER’s with HTTP. Websockets require an OO program to run
on the server since it holds persistent connections to n clients on the
same time.



Websockets is quite a new W3C standard so don’t expect websockets to run
smoothly in all browsers.



I think that Kevin has played around with websockets based on java and now
you can also make websockets applications under powerRuby since both Ruby
and NodeJS is ported but websockets at the present is on “if you absolutely
need to use it” state since websockets won’t run native but only under PASE.



As Nathan points out there is a lot of tangents such a discussion as this
can turn into since because there also is a lot of home brewed solutions in
order to circumvent a specific problem.


On Sat, Jul 12, 2014 at 7:55 PM, Pete Helgren <pete@xxxxxxxxxx> wrote:

(Re-posting after getting a non-delivery notice....)

Kevin,

It does seem simple...most of my web stuff is done in Java so for this
kind of cross domain stuff that doesn't support jsonp calls, I usually
resort using the Java equivalent of HTTPAPI, the Java Http client
classes. Either way, it seems pretty simple. I am most familiar with
HTTPAPI in this type of setting (RPG). I have never used GetURI.

I'll need some additional clarification from Darryl (a transactional
"picture" would be great)...


Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java

On 7/11/2014 7:36 AM, Kevin Turner wrote:

Pete

Unless I have completely misunderstood the question, I think that point 1
is not correct. I think the list of data (and buttons) is delivered from a
different server/domain to the one that Darryl wants to use to process the
request from the button. If this is not the case, it seems a rather simple
problem to solve.

Cheers
Kevin




--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
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.