Crazy_Robert Posted December 1, 2017 Report Posted December 1, 2017 I moved script renders to the bottom of the layout page because drop down in reports is not working. scripts bottom lo unte maa teammate chese inko page lo submit button work avvatledhu . @Scripts.Render("~/bundles/modernizr") @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jqueryval") @Scripts.Render("~/Scripts") @RenderSection("scripts", required:=False) naku chala isues vosthunnayi. any other way to get the fields in dropdown by keeping scripts at the top. <script type="text/javascript"> $('#reportType').change(function () { var selectedID = $(this).val(); if (selectedID == -1) { $('#partialPlaceHolder').hide(); return; } if (selectedID == 5) { $.ajax({ type: "GET", url: '@Url.Action("Search", "Maintenance")', data: 'id=' + selectedID, dataType: "html", success: function (data) { /* data is the pure html returned from action method, load it to your page */ $('#partialPlaceHolder').html(data); /* little fade in effect */ $('#partialPlaceHolder').show(); } }); } else if (selectedID > 0) { if (!$("#SearchReports").valid()) { $('.error').remove(); } $("#SearchReports").submit(); } }); </script> Quote
Duryodana Posted December 1, 2017 Report Posted December 1, 2017 neku job lo sahayam sesinodiki salary lo sahayam sestava Quote
Crazy_Robert Posted December 1, 2017 Author Report Posted December 1, 2017 1 minute ago, Duryodana said: neku job lo sahayam sesinodiki salary lo sahayam sestava sesedhanu.. naku paraksy lu , sapota lu leru.. andhuke aduguthanu.. naipunyulani .. theliyani vallaki kuda thelusthadhi kadha elanti issues vocchinapudu Quote
Biskot Posted December 1, 2017 Report Posted December 1, 2017 rendering scripts ala ne unchi... neku kavalsina fucntionality.. page load lo rasuko... $(document).ready(function(){ // your code }); Quote
Crazy_Robert Posted December 1, 2017 Author Report Posted December 1, 2017 5 minutes ago, Biskot said: rendering scripts ala ne unchi... neku kavalsina fucntionality.. page load lo rasuko... $(document).ready(function(){ // your code }); yes kaka. I tried. Document.ready lo rasthe menu options chupinsthundhi .but second time menu option change ayithe work avvatledhu Quote
Biskot Posted December 1, 2017 Report Posted December 1, 2017 7 minutes ago, Crazy_Robert said: yes kaka. I tried. Document.ready lo rasthe menu options chupinsthundhi .but second time menu option change ayithe work avvatledhu try this $(document).on('change','#reportType',function(){ //your code }); Quote
Crazy_Robert Posted December 1, 2017 Author Report Posted December 1, 2017 4 minutes ago, Biskot said: try this $(document).on('change','#reportType',function(){ //your code }); same issue Quote
Suhaas Posted December 1, 2017 Report Posted December 1, 2017 Try this https://forums.asp.net/t/1994773.aspx?JQuery+doesn+not+work+when+I+have+bundle+at+the+bottom+but+if+I+move+to+top+it+works https://stackoverflow.com/questions/25458717/why-asp-net-mvc-5-put-scripts-render-bundles-jquery-at-the-bottom-in-layo If not, any possibility of fiddling your code? Quote
Duryodana Posted December 1, 2017 Report Posted December 1, 2017 49 minutes ago, Biskot said: try this $(document).on('change','#reportType',function(){ //your code }); 'change' aa 'ready' aa $( document ).on( 'ready', function () { Quote
alooparata Posted December 1, 2017 Report Posted December 1, 2017 1 hour ago, Crazy_Robert said: I moved script renders to the bottom of the layout page because drop down in reports is not working. scripts bottom lo unte maa teammate chese inko page lo submit button work avvatledhu . @Scripts.Render("~/bundles/modernizr") @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jqueryval") @Scripts.Render("~/Scripts") @RenderSection("scripts", required:=False) naku chala isues vosthunnayi. any other way to get the fields in dropdown by keeping scripts at the top. <script type="text/javascript"> $('#reportType').change(function () { var selectedID = $(this).val(); if (selectedID == -1) { $('#partialPlaceHolder').hide(); return; } if (selectedID == 5) { $.ajax({ type: "GET", url: '@Url.Action("Search", "Maintenance")', data: 'id=' + selectedID, dataType: "html", success: function (data) { /* data is the pure html returned from action method, load it to your page */ $('#partialPlaceHolder').html(data); /* little fade in effect */ $('#partialPlaceHolder').show(); } }); } else if (selectedID > 0) { if (!$("#SearchReports").valid()) { $('.error').remove(); } $("#SearchReports").submit(); } }); </script> dorikinda solution leda inthaki Quote
Duryodana Posted December 1, 2017 Report Posted December 1, 2017 52 minutes ago, Biskot said: try this $(document).on('change','#reportType',function(){ //your code }); my bad ready kaadu anukunta older versions lo .live ani undedi mari ippudu dani equivalent endo Quote
Crazy_Robert Posted December 1, 2017 Author Report Posted December 1, 2017 4 minutes ago, alooparata said: dorikinda solution leda inthaki try chesthunna.. group projects tho idhe issues Quote
alooparata Posted December 1, 2017 Report Posted December 1, 2017 Just now, Crazy_Robert said: try chesthunna.. group projects tho idhe issues usually chaala varaku jquery issues ki solutions easy ga dorukuthay online lo, stackoverflow choosinava Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.