$('td').on('click', function(eventData) { var full = $(this).text(); var pairSymbol = $(this).contents().eq(0).text(); var pairSymbolClearSpace = pairSymbol.split(" ").join(""); var lineHeight = $(this).css("line-height"); lineHeight = parseInt(lineHeight.substring(0, lineHeight.length - 2)); var line = Math.floor(eventData.offsetY / lineHeight); var fullLine = ($(this).text().split("\n")[line]); var splitFullLine = fullLine.split(" = "); var tElement = splitFullLine[0]; var tElementClearSpace = tElement.split(" ").join(""); var beforeStar = splitFullLine[1].split("*"); var buySell = beforeStar[0]; var buySellClearSpace = buySell.split(" ").join(""); $("#pairSymbol").val(""); $("#tElement").val(""); $("#tElement").val(""); $("#winCount").val(""); $("#lossCount").val(""); $("#pairSymbol").val(pairSymbolClearSpace); $("#tElement").val(tElementClearSpace); $("#buySell").val(buySellClearSpace); //alert(buySell); $.ajax({ type: "POST", url: "modal_view_winLoss.php", data: { pairSymbol: pairSymbolClearSpace, tElement: tElementClearSpace, buySell: buySellClearSpace }, cache: false, success:function(data) { if(data == "error") { location.reload(); } else { var winLoss = data.split("##"); $("#winCount").val(""); $("#lossCount").val(""); $("#winCount").val(winLoss[0]); $("#lossCount").val(winLoss[1]); } } });
Enter your email address:
Subscribe in a reader
If you feel my website is informative and it is useful for you, please donate some money to support me or buy me a drink. I will continues this good works. Thank you.
0 comments