I am using the Google CDN to call the jQuery 1.4.2 Min File into my application. One FF, Chrome, Safari everything is working great. But for some reason, i get a "Access Denied" error for the jquery.min.js file on line 127...? I don't get it. Anyone have a clue why this is acting up in this way? I am totally clueless.
!
Screenshot
Code
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
type="text/javascript"></script>
.
case 1:
methodName = "SavePropertyInformation";
var HasFoundProperty, PropertyType, NumberOfUnits,
PropertyAddress, PropertyCity, PropertyState,
PropertyZipCode, PropertyCounty;
HasFoundProperty = $("#foundProperty input[type='radio']:checked").val();
PropertyType = $('#<%= this.fvApp.FindControl("ddlPropertyType").ClientID %>').val();
NumberOfUnits = $('#<%= this.fvApp.FindControl("ddlNumberOfUnits").ClientID %>').val();
PropertyAddress = $('#<%= this.fvApp.FindControl("txtPropertyAddress").ClientID %>').val();
PropertyCity = $('#<%= this.fvApp.FindControl("txtPropertyCity").ClientID %>').val();
PropertyState = $('#<%= this.fvApp.FindControl("ddlPropertyState").ClientID %>').val();
PropertyZipCode = $('#<%= this.fvApp.FindControl("txtPropertyZipCode").ClientID %>').val();
GetCountyFromZipCode(PropertyZipCode);
PropertyCounty = GetCounty();
data = "{WebAccessID:'" + WebAccessID + "', HasFoundProperty:'" + HasFoundProperty + "', PropertyType:'" + PropertyType + "', NumberOfUnits: '"
+ NumberOfUnits + "', PropertyAddress: '" + PropertyAddress + "', PropertyCity:'" + PropertyCity
+ "', PropertyState:'" + PropertyState + "', PropertyZipCode:'" + PropertyZipCode + "',PropertyCounty:'"
+ PropertyCounty + "' }";
doAjaxReq(methodName, data, showSavingDialog);
break;
Making a call to a sub domain is seen as a different domain because of the Same Origin policy. Make sure that you are setting document.domain to avoid access denied with the Same Origin policy.
To get the document.domain in sync you need to set it in two places. Add a script tag that set the domain, and you need to have an iframe on the page that sets the same thing on the other domain.
The page that the Ajax call is made from "www.example.com" and is calling "ajax.example.com":
<script type="text/javascript">
document.domain = "example.com";
</script>
<iframe src="http://ajax.example.com/domainCode.html"></iframe>
The "domainCode.html" would just contain the script tag
<html>
<head>
<script type="text/javascript">
document.domain = "example.com";
</script>
</head>
<body>
</body>
</html>
With that in place you should be able to talk between your sub domains.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With