如何处理向外部站点提交表单的超时 [英] How to handle form submit timeout to external site

查看:159
本文介绍了如何处理向外部站点提交表单的超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们有一种情况,我们要使用一些隐藏的输入变量向外部站点提交表单,其中一个是"redirecturl",外部站点在完成其操作后将其重定向到该目录.此变量指向我们网站上的页面.

提交表单后,我们想处理外部站点的超时或服务器不可用.到目前为止,我们还无法使用javascript找到任何合适的解决方案.

任何解决方案/指针都将有所帮助.

谢谢
Jas

Hi,

We have a scenario where we are submitting a form to external site with some hidden input variables, one of which is "redirecturl" which is used by external site to redirect to after it has completed its operation. This variable points to a page in our site.

We want to handle the time out or server unavailability of the external site, after we submit the form. Till now we have not been able to find any decent solution using javascript.

Any solution/pointer would be helpful.

Thanks
Jas

推荐答案

通过使用C#,您可以获取响应标头(如果500,404或其他...),但是通过使用JS,使用XMLHttpRequest或喜欢.
by using C# you can get response header if 500,404 or etc ..., but by using JS maybe this is impossible (because security) in using XMLHttpRequest or like.


这篇关于如何处理向外部站点提交表单的超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆