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.
I have provided the exact code (less customer references) below.
If you manually open the page by keying in the URL into IE the page executes, updates the file and then automatically closes itself using JavaScript. The javascript is written in a way that does not prompt the user it just closes. However, when I use the UVRunCommand to execute "iexplore and quotes around the url, IEXPLORE.EXE stays running in task manager for ever and UVRunCommand does not return

Any Ideas?

Here is the UV Basic code
--------------------------------------
      DECLARE GCI UVRunCommand
      PROD.NO=OCONV(TIME(),"MTS")
      CONVERT ":" TO "" IN PROD.NO
      EXPLORER="c:\Program Files\Internet Explorer\iexplore.exe"
      WEBPAGE="http://MyCustomersWebsite.com/produpdate.asp?prodno=":PROD.NO
      BATCH='"':EXPLORER:'" "':WEBPAGE:'"'
      RESP=UVRunCommand(BATCH)
PRINT RESP ' IF I End Task IEXPLORE.EXE' I get a 0 response indicating correct completion


Here is the ASP and JavaScript that runs on the Customer's Web Server
---------------------------------------------------------------------------------------------------------
<%
response.write "<html>"
response.write "<script>"
response.write "function closewindow()"
response.write "{"
response.write "window.opener = top;"
response.write "window.close();"
response.write "}"
response.write "</script>"
response.write "<script>"
response.write "function timeout()"
response.write "{"
response.write "window.setTimeout('closewindow()',1000);"
response.write "}"
response.write "</script>"
response.write "<body onload='timeout()'>"
ProdNo=request.querystring("ProdNo")
response.write "got Prod#" & ProdNo
dim fs,tfile
set fs=Server.CreateObject("Scripting.FileSystemObject")
set tfile=fs.CreateTextFile("c:\somefile.txt")
tfile.WriteLine(ProdNo)
tfile.close
set tfile=nothing
set fs=nothing
response.write "</body>"
response.write "</html>"
%>

Curt Lashley
2803 North Boulevard
Tampa, FL 33602
Cell: (813) 293-2878 or (800) 886-2878
Home: (813) 226-2878 or (800) 524-2878
Fax: (813) 229-2878

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

Reply via email to