如果我重定向到其他页面,为什么Web服务无法调用Mozilla? [英] Why Webservice Cant Call In Mozilla If I Redirect To Other Page ?

查看:70
本文介绍了如果我重定向到其他页面,为什么Web服务无法调用Mozilla?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在我的网络应用程序中,我将使用javascript进行数据库中的某些事务的调用webservice,我将重定向到javascript本身的注销页面。这是我的代码



  function  RedirectToLogin(){
var UserName = document .getElementById( MasterUser)值;
SuperFastWS.FnLogout( decodeURI (UserName));
// alert(Hai)
window location = logout.aspx;
}





在Mozilla中只能快速转到

  window  location  





它不会转到web服务中的FnLogout函数,在FnLogout函数中我写插入查询,在IE和Chrome中调用该函数并执行该查询,但在Mozilla中只能快速处理并转到window.location行,所以FnLogout函数不是tigger,

如果我在调用webservic后调用了警告msg,那么只有它在mozilla.i中触发FnLogout函数时不知道为什么如果有一点点延迟时间然后只在Mozilla浏览器中触发FnLogout函数,



请告诉我如何在不使用警报的情况下解决这个问题msg

解决方案


最后我得到解决方案表格这个链接



http://www.tutorialspoint.com/ javascript / javascript_page_redirect.htm [ ^ ]





我在调用webservice方法之后只需将setTimeout调用重定向到其他页面,所以它有一些时间来跳转



  function  RedirectToLogin(){
var UserName = document .getElementById( MasterUser)值。
SuperFastWS.FnLogout( decodeURI (UserName));
setTimeout(' Redirect()' 5 );
}

function Redirect(){

窗口 location = logout.aspx ;
}





因此,在setTimeout以上我将获得约5微毫秒等待并调用重定向到其他页。


Hi In my web application i will use javascript for call webservice for some transaction in database and i redirect to logout page in javascript itself.Here is my code

function RedirectToLogin() {
           var UserName = document.getElementById("MasterUser").value;
           SuperFastWS.FnLogout(decodeURI(UserName));
         //alert("Hai")
            window.location = "logout.aspx";
       }



in Mozilla only fastly go to

window.location



it will not go to FnLogout function in webservice,in FnLogout function i write insert query,in IE and Chrome call that function and execute that query,but in Mozilla only fastly process and go window.location line so FnLogout function not tigger,
if i put alert msg after calling webservicce then only it tigger FnLogout function in mozilla.i don't know why if have some little bit delay time then only tigger FnLogout function in Mozilla browser,

Pls tell me how to solve this problem without use alert msg

解决方案

Hi Finally i got solution form this link

http://www.tutorialspoint.com/javascript/javascript_page_redirect.htm[^]


just i add setTimeout call redirect to other page after calling webservice method,so it have some time to tigger

function RedirectToLogin() {
         var UserName = document.getElementById("MasterUser").value;
         SuperFastWS.FnLogout(decodeURI(UserName));
         setTimeout('Redirect()', 5);
      }

      function Redirect() {

          window.location = "logout.aspx";
      }



So above setTimeout i will get some 5 micro milli secs to wait and call redirect to other page.


这篇关于如果我重定向到其他页面,为什么Web服务无法调用Mozilla?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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