[jQuery] Trouble referencing an element's id after binding a click event to a set of elements
Hello chaps and chapesses I have hit a bit of a snag and wondered if you could help me out. I am using the jHelperTip plugin and am trying to apply a tooltip to multiple info icons in one hit rather than code each one up individually. Here is my code $(".tooltipContainer .tooltipTrigger").jHelperTip({ trigger: "hover", topOff: 18, leftOff: -73, dC:"#" + $(this).find(".tooltipContent").attr("id"), autoClose: false }); The problem is that the content for the first tooltip pops up for each one. I'm guessing the $(this) selector is not getting the correct trigger. What do I need to do? Cheers Mart
[jQuery] Re: Nested Ajax callbacks not working in IE7
Hi Jonny Yeah I tried that mate, it was still the same issue. It is definitely the JSON string in the data block that is causing the error. I just need to know how to get IE7 to like it Cheers Dannster
[jQuery] Re: Nested Ajax callbacks not working in IE7
OK Guys I have narrowed it down It is not the fact that the ajax requests are nested, it is down to the format of the JSON string in the data: block I narrowed the example down to something really simple $.ajax({ type: "POST", data: '{"name":"dave"}', url: "WebServices/KayakService.asmx/testMethod", beforeSend: function(xhr) { xhr.setRequestHeader("Content-type", "application/json; charset=utf-8"); }, dataType: "json", success: function(msg) { alert('success'); }, error: function(msg) { alert('failed'); } }); IE doesnt like the data block at all and always fails without even hitting the web service. Dannster
[jQuery] Nested ajax calls not working in IE7
Has anyone come across this issue? I have an ajax callback with a function defined in the success member which fires another ajax callback. In Firefox this works fine but in IE7 only the first callback fires. here is the code // Get a Session Id $.ajax({ type: "POST", url: "/WebServices/KayakService.asmx/GetSession", beforeSend: function(xhr) { xhr.setRequestHeader("Content-type", "application/json; charset=utf-8"); }, dataType: "json", success: function(msg) { sessionId = msg; alert(sessionId); $.ajax({ type: "POST", data: '{"origin":"' + originCode + '","destination":"' + destinationCode + '","depDate":"' + $("#depDate").val() + '","retDate":"' + $("#retDate").val() + '","sessionId":"'+ sessionId +'"}', url: "/WebServices/KayakService.asmx/GetFlightSearchId", beforeSend: function(xhr) { xhr.setRequestHeader("Content-type", "application/json; charset=utf-8"); }, dataType: "json", success: function(e) { searchId = e; alert(searchId); getResults(); } }); } });
[jQuery] Nested Ajax callbacks not working in IE7
Hi Guys Has anyone had any problems with nested callbacks in IE7? I have an ajax callback which contacts a web service and fires another ajax callback on success. Both callbacks get fired on Firefox but only the first one gets fired om IE7. here is my code... $.ajax({ type: "POST", url: "/WebServices/KayakService.asmx/GetSession", beforeSend: function(xhr) { xhr.setRequestHeader("Content-type", "application/json; charset=utf-8"); }, dataType: "json", success: function(msg) { sessionId = msg; alert(sessionId); $.ajax({ type: "POST", data: '{"origin":"' + originCode + '","destination":"' + destinationCode + '","depDate":"' + $("#depDate").val() + '","retDate":"' + $("#retDate").val() + '","sessionId":"'+ sessionId +'"}', url: "/WebServices/KayakService.asmx/GetFlightSearchId", beforeSend: function(xhr) { xhr.setRequestHeader("Content-type","application/json; charset=utf-8"); }, dataType: "json", success: function(e) { searchId = e; alert(searchId); getResults(); } }); } }); Any help appreciated, bit of a showstopper this one. Dannster