Created
February 17, 2018 13:35
-
-
Save joshi-kumar/d56d15e3e832fa52291e841eb701857c to your computer and use it in GitHub Desktop.
Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
analyticsandreport: function (urladd,productId,categoryId,typeId) { | |
$.ajax({ | |
cache: false, | |
url: '/AnalyticsAndReports/InsertAnalytic', | |
data: { productId: productId, typeId: typeId, categoryId: categoryId }, | |
type: 'post', | |
success: function (data) { | |
// window.location.href = urladd | |
}, | |
}); | |
}, | |
----------------------------------------- | |
<div class="image"> <a onclick="AjaxCart.analyticsandreport('@analyticsurl','@productId','@categoryId','@typeId');return true;" href="@Url.RouteUrl("Product", new { SeName = Model.SeName })"><img alt="@Model.DefaultPictureModel.AlternateText " src="@Model.DefaultPictureModel.ImageUrl " title="@Model.DefaultPictureModel.Title " /></a> </div> | |
Here if we do return true the call anchor else not come back and anchor url will not call; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment