var clickMap_tags = "a,img,input,select,textarea,object,embed,iframe,button,area,.clickMap_target"; var clickMap_container = "#wrapper"; $(function(){ $('body table:first').attr('id', 'wrapper'); var p = ''; var l = '16/11/2018 3:20:28 PM'; var session = '708715533'; $(clickMap_tags, clickMap_container).click(function(e){ var x = e.pageX - $(clickMap_container).offset().left; var y = e.pageY - $(clickMap_container).offset().top; if(x >= 0 && y >= 0){ var info = "element : '" + escape(this.nodeName.toLowerCase()) + "', id : '" +escape( $(this).attr("id")) + "', name : '" + escape($(this).attr("name")) + "', text : '" + escape($(this).text()) + "'"; if (this.nodeName.toLowerCase() == 'img') { info += ", src : '" + escape($(this).attr("src")) + "'"; } var postData = "s=" + session + "&p=" + escape(p) + "&x=" + x + "&y=" + y + "&r=" + escape(document.referrer) + "&i={" + info + "}&l=" + escape(l.replace(/\s/, '+')) $.ajax({ type: "POST", url: 'https://www.bluemts.com.au/clickmap/clickmap-click.asp', data: postData, async: false }); } }); //$('
').appendTo('body').css({position:'absolute',top:'12px',left:($(clickMap_container).offset().left + $(clickMap_container).width() + 12)}); });