开发者

Problem with scripts in website

开发者 https://www.devze.com 2023-03-17 01:29 出处:网络
Here is the problem: When I log into my website instead of taking me to last page where I was, after I type my password and login it shows the message below ....

Here is the problem: When I log into my website instead of taking me to last page where I was, after I type my password and login it shows the message below ....


This XML file does not appear to have any style information associated with it. The document tree is shown below.

   <!-- uzzscript type="text/javascript"&gt;
sendFrm549298=function(){
 var o=$('#frmLg549298')[0],pos=_uGetOffset(o),o2=$('#blk549298')[0];
 document.body.insertBefore(o2,document.body.firstChild);
 $(o2).css({top:(pos['top'])+'px',left:(pos['left'])+'px',width:o.offsetWidth+'px'开发者_运维技巧,height:o.offsetHeight+'px',display:''}).html('&lt;div align="left" style="padding:5px;"&gt;&lt;div class="myWinLoad"&gt;&lt;/div&gt;&lt;/div&gt;');
 _uPostForm('frmLg549298',{type:'POST',url:'/index/sub/',error:function() {
 $('#blk549298').html('&lt;div align="left" style="padding:10px;"&gt;&lt;div class="myWinLoadSF" title="Невозможно выполнить запрос, попробуйте позже"&gt;&lt;/div&gt;&lt;/div&gt;');
 _uWnd.alert('&lt;div class="myWinError"&gt;Невозможно выполнить запрос, попробуйте позже&lt;/div&gt;','',{w:250,h:90,tm:3000,pad:'15px'});
 setTimeout("$('#blk549298').css('display','none');",'1500');
 }
 });
}
&lt;/script&gt;-->


The code you've pasted in the question is an XML document, presumably generated by your login process.

It is clearly intended to be sent to the browser as part of an Ajax request, but the way you describe it, it sounds as if it is being loaded as a new page.

This indicates to me that when you post the login details, it isn't actually being posted using Ajax, but is instead being posted using a regular HTML form submit.

The actual error message itself ("This XML file does not appear to have any style information...") is a standard message that the web browser will give when it loads an XML document which it doesn't know how to handle. This is what tells me that it's being displayed as a new page rather than loaded via Ajax.

If it had been loaded via Ajax as intended, then the XML data would have been fed into the Javascript code on your page, and would never have been displayed in this way.

You need to examine the code around your form and submit button to see why it is posting as a HTML form submit instead of via Ajax. You haven't given us your form code (or even told us what Ajax framework you're using), so I can't really give you any more clues at this point, but that is almost certainly where the problem lies.

I hope that helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消