I have a really weird problem that I hope someone can shed some light on. I am using jquery to get an Http response from another site (which I have). When I get the DOM, I parse it to get specific information. However, when I try to get the href attribute of a link, IE adds the local domain to the top of href!
Here is my code:
$.ajax({
type: "POST",
url: "MyPage.aspx/GetWebResponse",
data: "http://myWebSite/pages/AnotherPage.aspx",
contentType: "application/json; charset=utf-8",
dataType: "json",
asynch: false,
success: function(data)
{
var __htmlForMainPage = data.d;
var PageLink = $(__htmlForMainPage).find("a:contains('Get This Link')").attr("href");
}
});
My PageLink variable MUST be "/pages/getThisPage.aspx?id=8347". However, it returns as " http: //myserver/pages/getThisPage.aspx? Id = 8347 ".
IE. FireFox . , . , , IE, FF. , FF , IE .
- , ? !