如何处理向外部站点提交表单的超时

编程入门 行业动态 更新时间:2024-10-15 08:19:21
本文介绍了如何处理向外部站点提交表单的超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我们有一种情况,我们要使用一些隐藏的输入变量向外部站点提交表单,其中一个是"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.

更多推荐

如何处理向外部站点提交表单的超时

本文发布于:2023-11-25 23:32:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1631792.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表单   如何处理   站点

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!