> From:> curt
> I have an application that needs to open up a web page 
> from within Universe and pass a query string to the 
> Web Server to update some product information.
[snip]

There are a lot of things that are awkward about this request.
You'll want to read through my comments before responding.

1) What's the overall goal?  The code you've presented runs IE on
the server, not a client PC.  The web page does nothing but read
the query string, and then write the data back into the client
PC.  If you run this on the server you're basically just writing
to a local file.

2) Maybe I'm missing something about exactly what UVRunCommand
does, but why not use EXECUTE "DOS /C ":COMMAND  ?  Is the
difference that GCI operations are inproc and Executes that shell
out are not?

3) Do you really want to open up a browser just to communicate
with a remote server?  That's not the right tool for the task.  A
browser is an application intended to provide a user interface.
I believe you want to use a "headless" solution, like cURL or
CallHTTP, rather than launching a browser.

4) Browsers these days generally prohibit code from doing exactly
what you're describing.  You go to a web page and 'poof' it
either closes it's own window on you, or it attempts to close
down the whole browser.  The JavaScript Window.Close is intended
to close child forms (popups) which are launched from a parent,
not to close a primary window to which the user navigates.

5) The JavaScript you provided attempts to create a file system
object and write data to the user's PC.  That's yet another big
no-no, even with Trusted sites.  I'm guessing the real web page
processes the request, re-writes the URL or does something to put
a response into the resulting page, and then writes the result
back to the local system?  In this case, OK, neither cURL nor
CallHTTP are going to process that script, but you may do better
to parse the response rather than allowing some client code to
write back to the DBMS localhost disk.  That's just way too
awkward, and the overhead of opening and closing the browser is
very non-performant as well.

I think the approach needs to be re-evaluated.  You can do what
you want with IE running in the background using a custom browser
AddIn (we write this sort of code here), but I think this is
still the wrong tool for this job.

HTH

Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
remove.pleaseNebula-RnD.com/blog 
Visit PickWiki.com!  Contribute! 


_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to