META REFRESH - Is there a better way?
META REFRESH - Is there a better way?
(OP)
At my work we use a lot of META REFRESH code to re-direct the user to another service. We are using Native services with only the default.asp to handle in login/logout routine.
Typically refreshes occur when a user submits a form to a different service then redirects to another service after completing the edits and updating of data. I understand that different coding techniques could probably avoid the META REFRESH all together, but there may be some instances where we would want to have a service re-direct/call another service and have the browser routed to that service.
I stumbled across this yesterday:
@ ldv,p <svc>s20='InventoryRpt' .
@ ldv,p <tmpdir>s40='c:\coolice\temp\' .
@ ldv,p <outdir>s20='c:\InetPub\wwwroot\' .
@ brk,0,A .
. Batch Interface to ICE Services
*=====================================
|Browser Input
*Category
Inventory
*Service
<svc>
*Type
Golf
*Gender
Womens
@ brk .
@ lnk ICESVCHND,<tmpdir>,<outdir><svc>'.htm',B .
But i think this is mainly for updating static documents on the server?? I will play around with this let u know if it will do what I want.
What we really need to have is a bulletproof way to issue a "HTTP GET/POST" from a ICE service without using a META REFRESH or JavaScript re-direct.
Just curious how others are handling this.
Thanks for your time
Ed
Typically refreshes occur when a user submits a form to a different service then redirects to another service after completing the edits and updating of data. I understand that different coding techniques could probably avoid the META REFRESH all together, but there may be some instances where we would want to have a service re-direct/call another service and have the browser routed to that service.
I stumbled across this yesterday:
@ ldv,p <svc>s20='InventoryRpt' .
@ ldv,p <tmpdir>s40='c:\coolice\temp\' .
@ ldv,p <outdir>s20='c:\InetPub\wwwroot\' .
@ brk,0,A .
. Batch Interface to ICE Services
*=====================================
|Browser Input
*Category
Inventory
*Service
<svc>
*Type
Golf
*Gender
Womens
@ brk .
@ lnk ICESVCHND,<tmpdir>,<outdir><svc>'.htm',B .
But i think this is mainly for updating static documents on the server?? I will play around with this let u know if it will do what I want.
What we really need to have is a bulletproof way to issue a "HTTP GET/POST" from a ICE service without using a META REFRESH or JavaScript re-direct.
Just curious how others are handling this.
Thanks for your time
Ed
RE: META REFRESH - Is there a better way?
It all depends on what you want to do with the data, and what format it will return. If you're getting data back as XML, this is obviously easier to parse than if you're getting back raw HTML.
I've used all these techniques in the past- to connect to a data provided to do vehicle look-ups, to refresh currency exchange rates from the Bank of England's data warehouse, to provide a path to a back-end server using web services.
If you're just wanting to call another ICE service, there's an API provided to do that- but you need to consider how you are going to present the output. If you're essentially wanting to *replace* the output with that from the called service, you can simply pass the result back to the service handler. If you plan to integrate bits of the output, you perhaps need to write the service in such a way that you can call it with a parameter that will give you back just the data with no presentation context.
I've written "quiet" services that return just data, to be called from AJAX calls from a web-based front end. It's interesting to debug! :)
--
Marc
RE: META REFRESH - Is there a better way?
The whole process of using the COM callable wrapper is new to me. Would you be willing to put a quick and simple example together to demonstrate the functionality of either one of the ASP utilities mentioned above. Much thanks would be appreciated.
Thanks again,
Ed