Thanks for the link, its interesting.
That article references an interestged javascript library for this type
of work. It basically creates a cross-paltform hidden iframe on the
page and uses that iframe to make the calls.
Many of the examples that I have seen use an intermediate data fromat,
like a csv file, but then you have to parse it on the client side. It
seems easier to just have the server generate the javascript calls directly.
I started looking at XML as a way to handle this, both IE and Moz 6
support calling external xml files, but then you have to parse the
result and do extra work on the client side.
Thanks,
-Aaron
Tracy S. Ruggles wrote:
> Also, see the article at:
> http://www-106.ibm.com/developerworks/library/wa-resc/?dwzone=web
>
> It's a great overview of remote scripting and is similar to your
> approach below.
>
> --T
>
> On Monday, March 3, 2003, at 10:58 AM, Aaron Held wrote:
>
> This is a JavaScript issue, not a Webware one, but here is a quick
> pointer.
>
> 1) Setup a listbox on the page adn add a javascript function to
> add values to that listbox
>
> function addopt2(nValue, sText){
> // this routine adds a new item to our listbox
> document.Groups.list2.options[document.Groups.list2.options.length] =
> new Option(sText, nValue);
> }
>
> 2) When the user clicks a button fire off this JavaScript
>
> function getLevel2(sCode){
> if (sCode == 'NONE' || sCode == ''){
> // if they click on an label or empty value
> } else {
> // a non-empty area
> window.open("popfetchlevel2?level=2&code=" + sCode, + ",
> gofetch","toolbar=no,menubar=no,location=no,directories=no,status=no,resizea
> ble=no,width=100,height=100,left=100,top=100");
> }
> }
>
> This will pop up a window that will call a servlet to interact
> with the database and then call teh javascript from step 1 to
> update the page.
>
> Webware Tip: Override writeHTML in the pop-up servlet to bypass
> yourr layout
>
> step 3
> Write your servlet to return an html page containing javascript
> such as:
>
> <script>
> window.opener.addopt2("aheld", "Aaron Held");
> window.opener.addopt2("asd", "another name");
> </script>
>
> window.operner.addopt2 directly calls the javascript from step1
>
> -Aaron
>
>
>
>
> Paul Jessup wrote:
>
> Dear Webware,
>
> I am going to try out you system to-night. It seems similar to
> Cold Fusion
> Application Server. I am interested in Python and Jython very
> much for
> future projects. I write web applications for customers using
> Cold Fusion.
>
> I am trying (with difficulty) to do the following, which I can
> of course do
> one item at a time by posting the page, but not as follows.
>
> The idea is to create a page, which the user enters a
> reference number, the
> program looks up this in the database, puts the relevant
> description or "not
> found" on the screen. The user enters the quantity, and the
> program work out
> the total,, and puts the next input box on the screen, WITHOUT
> leaving the
> page. Possible?
>
> Anyway, if this can be done, I would be grateful for pointers!
>
> Kind regards,
> Paul Jessup
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Webware-discuss mailing list
> Webware-discuss@...
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Webware-discuss mailing list
> Webware-discuss@...
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
>
> --
> Tracy S. Ruggles
> Chief Technology Officer, Axiomfire
> tracer@... -- 512/461.6199
>
|