Question : IE errors on ajax function

I received help with an AJAX solution that both redirects a page and processes a form from one button.

I neglected to test it in IE before closing that question, but it's now getting errors.

Errors from IE:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Tue, 27 Jul 2010 14:40:58 UTC

Message: 'document.body' is null or not an object
Line: 19
Char: 23004
Code: 0
URI: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js

Message: Access is denied.
Line: 127
Char: 287
Code: 0
URI: http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js


The page is http://www.daveyost.com/splash-page

Thanks!

Answer : IE errors on ajax function

Finally, I think I have your solution once and for all:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"    
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">    
<html>    
  <head>          
    <title>Welcome to ____</title>    
    <link rel="stylesheet" type="text/css" href="/styles.css" /> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>   
<script type="text/javascript">    
$(document).ready(function(){
	$("#form_tag").submit(function(){
		setTimeout('window.location="whateverurlcom"',500);
	});
});
</script>     
    
    <script type="text/javascript">    
    try {    
    var pageTracker = _gat._getTracker("UA-876977-25");    
    pageTracker._trackPageview();    
    } catch(err) {}</script>    
  </head>    
<body style="margin:0px; padding:0px; background-image:url(___/bg_texture.png);">    
<div id="splashbox">    
<div id="splashform">    
<!-- BEGIN: Constant Contact Form -->    
<form name="ccoptin" action="http://visitor.constantcontact.com/d.jsp" target="_blank" method="post" id="form_tag">    
<input type="text" name="ea" id="ea" size="26" value="&nbsp;email:" style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:18px; border:1px solid #DDDDDD; height:24px; line-height:24px;">    
<br /><br />    
<input type="image" src="http://daveyost.com/assets/173/splashsubmit.png"> 
<input type="hidden" name="m" id="m" value="1102336606191">    
<input type="hidden" name="p" id="p" value="oi">    
</form>    
<!-- END: Constant Contact Stylish Email Newsletter Form -->    
<!-- BEGIN: SafeSubscribe -->    
<a href="http://www.constantcontact.com/safesubscribe.jsp" target="_blank">Privacy by SafeSubscribe&#8480;</a>    
<br />    
<a href="http://www._____.com">Continue to main page</a>    
<!-- END: SafeSubscribe -->    
</div>    
</div>    
<div id="splashfooter">    
    
</div>    
</body>    
</html>
Random Solutions  
 
programming4us programming4us