Search Results

Search found 20 results on 1 pages for 'jqmodal'.

Page 1/1 | 1 

  • jqmodal IE (7 or 8) flashes black before modal loaded

    - by brad
    This is killing me. In both IE7 and 8, using jqModal, the screen flashes black before the modal content is loaded. I've set up a test app to show you what's happening. I've taken jqModal EXACTLY from the site, no changes whatsoever, no external css that could be affecting my app. It works perfectly in every other browser (including IE6). http://jqmtest.heroku.com/ So, first two links are ajax calls, second is straight up inline HTML. (I originally thought it was the ajax that was affecting it, but that doesn't seem to be the case, I then thought it was slow loading ajax, hence to two differen ajax links) What's crazy is that the jqmodal site itself works perfectly in IE, no flashing of black, but I can't see what I'm doing wrong. Code is straight forward html: <body> <div id="ajaxModal" class="jqmWindow"></div> <div id="inlineModal" class="jqmWindow"> <div style="height:300px;position:relative;"> <p>Here's some inline content</p> <a href="#" onclick='$("#inlineModal").jqmHide();return false;' style="position:absolute;bottom:10px;right:10px">Close</a> </div> </div> <div style="width:600px;height:400px;margin:auto;background:#eee;"> <p><a href="/ajax/short" class="jqModal">Short loading modal</a></p> <br /> <p><a href="/ajax/long" class="jqModal">Longer loading modal</a></p> <br /> <p><a href="#" class="jqInline">inline modal</a></p> </div> </body> Javascript: <script type="text/javascript"> $(function(){ $("#ajaxModal").jqm({ajax:'@href', modal:true}); $("#inlineModal").jqm({modal:true, trigger:'.jqInline'}); }); </script> CSS is exactly the same as the one downloaded from jqModal's site so I'll omit it, but you can see it on my app Has anyone experienced this? I don't get how his works and mine doesn't.

    Read the article

  • jqModal dialog - only displaying once

    - by James Inman
    I've got a jqModal dialog with the following code: $(document).ready( function() { $('td.item.active').click( function(e) { $(this).append( '<div class="new">&nbsp;</div>' ); $("#jqModal").jqm({ modal:true, onHide: function(e) { e.w.hide(); // Hide window e.o.remove(); // Remove overlay } }); $('#jqModal').jqmShow(); $('input#add_session').click( function(e) { e.preventDefault(); $('#jqModal').hide(); $('.jqmOverlay').remove(); }); }); }); The HTML used is as follows: <div id="jqModal" class="jqmWindow"> <form action="" method="post"> <ul> <li> <input id="add_session" name="commit" type="submit" value="Add Session" /> <input type="button" name="close" value="Close" id="close" class="jqmClose" /> </li> </ul> </form> </div> When I first click a <td>, the dialog launches without a problem. On the second click (or subsequent), the new class is added to the <div>, but the dialog doesn't launch.

    Read the article

  • jqModal dialog always under overlay.

    - by ProfK
    I have the following code, and am at my wit's end because the dialog always appears under the overlay. Any advice will be most appreciated: <head runat="server"> <title></title> <link href="../Styles/jqModal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> #shift-edit-popup { display: none; } </style> <script src="../Scripts/jquery-1.4.2.js" type="text/javascript"></script> <script src="../Scripts/jqModal.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $("#shift-edit-popup").jqm({ toTop: true }).jqmAddTrigger("#show-button"); }); </script> </head> <body> <form id="form" runat="server"> <input id="show-button" type="button" value="Show" /> <div id="shift-edit-popup"> <div> <asp:Label ID="resourceLabel" runat="server" AssociatedControlID="resourceList">Resource:</asp:Label> <asp:DropDownList ID="resourceList" runat="server" DataTextField="Name" DataValueField="ResourceId" Width="120px"> </asp:DropDownList> </div> </div> </body>

    Read the article

  • Show jQModal window on page load

    - by Machi
    Hi there, I'm playing with jQModal plugin and trying to display its window right after the page is loaded. I used this code in $(document).ready(function(): $('#letak').jqm({ overlay: 70, autofire: true }); autofire setting should do the trick but unfortunately it doesn't work. Works perfectly fine when I click at trigger link. Example: http://bz.machi.cz/ Am I doing something wrong? Thanks a lot, Jakub

    Read the article

  • jqModal/JQuery problem, div not updating with new content?

    - by echoesofspring
    I'm hoping someone can point a relative jQuery/jqModal newbie in the right direction for debugging this error. I'm loading an html fragment into a div and then use jqModal to display that div as a modal dialog. The problem is that the div is displayed but not with my updated html. I'm showing my jqModal dialog in the response from a jquery call, function foo is called from an onclick event: function foo(url) { $.ajax({ type: "GET", url: url, success: function(msg) { $('#ajaxmodal').html(msg); $('#ajaxmodal').jqmShow(); } }); } ajaxmodal is a simple div. Initially I thought the problem must be in the html snippet (msg) I'm passing to the callback, but I don't think that's it, I get the err (see below) even when I comment out the $('#ajaxmodal').html(msg) line or pass it hardcode html. I think I have jqModal configured correctly, other calls using our ajaxmodal div work correctly, I'm able to display the modal, update the content based the server response, etc. When I try to debug in firebug, I get the following error following the call to .jqmShow(). I have seen the err on occasion in other places when it seemed maybe the page hadn't loaded yet, and I confess I'm confused about that, since we've wrapped our jqModal selectors in a $(document).ready() call, so maybe I have a larger issue that this call just happens to trigger? From the jquery.jqModal.js file, line 64: js err is $(':input:visible',h.w)[0] is undefined in the line: f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}} When I step through this in firefox, h.w[0] seems ok, it references our '#ajaxmodal' div. Thanks in advance for any suggestions in tracking this down?

    Read the article

  • jqModal and jquery widget long shot

    - by rod
    Hi All, I just started playing around with jquery widgets within my jqmodals in my mvc app. I know this may be a long shot but I'll take it. Initially, I can click the Add link, get the alert ("which is the prize", watching too much tv), next click cancel to close modal and get the desired results. I can, then, click the Edit link and get the same desired results. However, if I click Edit link first then I try to click the Add link, "forget about it" I don't get the alert (which means my widget did not init). But I can still go back and click Edit and get the prize (the alert message). ajax: "/Home/EditPrintAdLine" and ajax: "/Home/AddPrintAdLine" render the same web user control Any ideas? <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> <asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server"> Home Page </asp:Content> <asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server"> <h2><%= Html.Encode(ViewData["Message"]) %></h2> <p> To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>. </p> <div id="printAdLineEditDialog" class="jqmWindow"></div> <div id="printAdDialog" class="jqmWindow"></div> <table> <tr><td><a id="printAdLineItem" href="#">Add a Line Item</a></td></tr> <tr><td><a id="editPrintAdLine" href="#">Edit</a></td></tr> </table> <script type="text/javascript"> $(document).ready(function() { $.widget("ui.my_widget", { _init: function() { alert("My widget was instantiated"); } }); // Add line $('#printAdLineItem').click(function(e) { $('#printAdDialog').jqmShow(this); e.preventDefault(); }); $('#printAdDialog').jqm({ ajax: "/Home/AddPrintAdLine", onLoad: function(hash) { $('#PrintAdLine_RunDate').my_widget(); } }); // Edit line $('#editPrintAdLine').click(function(e) { $('#printAdLineEditDialog').jqmShow(this); e.preventDefault(); }); $('#printAdLineEditDialog').jqm({ ajax: "/Home/EditPrintAdLine", onLoad: function(hash) { $('#PrintAdLine_RunDate').my_widget(); } }); }); </script> </asp:Content>

    Read the article

  • Jqm is not a function

    - by kris
    Hi all, I'm having some trouble with Jquery and JqModal, and I hope you are able to help, since I've been struggling for hours.. Having a single button element with an onclick action running my method "test" (shown below): $('#picture_form').jqm({ajax: '/test.php'}); $('#picture_form').jqmShow(); This will load the ajax content of test.php into my div element picture_form, shown using JqModal as its supposed to! Though when I close this window, and re-clicks the button I'm getting the error: $("#picture_form").jqm is not a function. As a solution I've tried to use the JqModal trigger function, and this leaves me able to open and close the JqModal windows as many times as I want to. Sadly I can only call the 'trigger' using test environment, in my production code I have to open the JqModal window using a function.. Does anyone have a clue why this 'bug' appears when calling the opening when using a function? Thanks in advance

    Read the article

  • How to load jQm modal on page load?

    - by Wazdesign
    Hi I am using jQm Window to load modal window. http://dev.iceburg.net/jquery/jqModal/#how i am trying to jqmShow Show jqModal element(s). $('#dialog').jqmShow(); $('.dialogs').jqmShow(); but it throws some JS error, but it does not load on the page load, please guide me for the same. TIA

    Read the article

  • jqgrid - edit form field combobox not defaulting to selected row value after first edit

    - by ooo
    i am using jqgrid with asp.net-mvc. I have an edit form (using jqmodal) which works great but for some reason one combobox field doesn't default to the current selected row after the first time i bring up the edit form. the weird thing is that i have many other comboboxes which work fine every time and i don't see any real difference. here is an example of the field that doesn't work: { name: "TechOwner", index: "TechOwner", width: 70, editable: true, edittype: "select", editoptions: { dataUrl: "/Person/GetSelectData" }, editrules: { required: true} }, and here is a field that works fine: { name: "FundingType", index: "FundingType", align: "left", width: 25, editable: true, edittype: "select", editoptions: { dataUrl: "/Project/FundingGetSelectData" }, editrules: { required: true} }, the dropdown is getting populated with all options (including the current selected row option) but its just defaulting to the top item) instead of one that matches the current row. is there anything to look out for here that may cause this behavior?

    Read the article

  • Can anyone tell me about a jQuery modal dialog box library that doesn't suck

    - by Ritesh M Nayak
    jQuery based modal dialog boxes are great as long as you do as much as the example tells you to. I need a jQuery based modal dialog box library that has to have the following characteristics: It should be fast, something like the add and link dialog on StackOverflow. Most libraries take an eternity to load the dialog with its fancy effects and stuff. I want to call it using a script. Show a hidden div or a span element inline. MOst of the libraries talk filling an anchor with rel, class and href=#hiddenDiv sort of things. I need to be able to what I want without adding unnecessary attributes to my anchor. Something like this function showDialog(values) { processToChangeDom(values); changeDivTobeDisplayed(); modalDialog.show(); } It should reflect changes I make to the DOM in the hidden Div. I used facebox and found out that it makes a copy of the hidden div and changes to the DOM doesn't reflect on the modal window. I need to be able call the close modal div using javascript and also attach beforeOpen and afterClose handlers to the action. Does anyone have any suggestions? I have already tried facebox, simplemodal and a whole range of libraries, most of them don't support one or the other of these functions I described above.

    Read the article

  • Focus element inside iframe when iframe attached to Jquery Dialog

    - by huzzy143
    Hi, I have a iFrame which i load into jquery dialog. I want to focus an element inside the iFrame whenever the Jquery Dialog is being opened. Here is the code i am using to attach iframe to Dialog. $("<div id=\"srch" + options.winId + "\" title=\"" + options.windowTitle + "\" style=\"padding-left:0px;padding-right:0px;padding-top:0px\" tabindex=\"-1\"><iframe src=\"" + url + "\" id=\"frame" + options.winId + "\" name=\"frame" + options.winId + "\" height=\"100%\" width=\"100%\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" tabindex=\"-1\"></div>").appendTo("body") //Now initialize a Dialog Window $('#srch' + options.winId).dialog({ autoOpen: (options.searchText == '') ? true : false, height: options.height, width: options.width, modal: options.isModal, closeOnEscape: true, open: function () { }, close: function () { $('#srch' + options.winId).remove(); } }); I have written this code inside the page which isopened through iFrame src. $(document).ready(function () { $('input1').focus().select(); }); How can i achieve this? Thanks, Huzefa

    Read the article

  • jqGrid Export to CSV Missing Column Names

    - by user561557
    I have a jqGrid that works perfectly. It contains a pager button to export the grid to a csv file which works and exports the data. However, I also need to have the column names exported with the data and I can't seem to get that to work. My working code follows. jQuery("#detail").jqGrid('navGrid','#pager2', {height:520,width:500,savekey:[true,13],navkeys:[true,38,40],reloadAfterSubmit:false, jqModal:false, closeOnEscape:true, bottominfo:"Fields marked with () are required"}, // edit options {height:520, width:500,savekey:[true,13],reloadAfterSubmit:false,jqModal:false, closeOnEscape:true,bottominfo:"Fields marked with () are required", closeAfterAdd: true}, // add options {reloadAfterSubmit:false,jqModal:false, closeOnEscape:true}, // del options {closeOnEscape:true}, // search options {height:250,width:500,jqModal:false,closeOnEscape:true}, {view:true} // view options ); // add custom button to export the data to excel jQuery("#detail").jqGrid('navButtonAdd','#pager2',{ caption:"", title:"Export to CSV", onClickButton : function () { exportExcel(); }, position:"last" }); // add custom button to print grid jQuery("#detail").jqGrid('navButtonAdd','#pager2',{ caption:"", title:"Print", buttonicon:"ui-icon-print", onClickButton : function () { jQuery('#detail_table').jqprint({ operaSupport: true }); return false; } }); function exportExcel() { var mya=new Array(); mya=jQuery("#detail").getDataIDs(); // Get All IDs var data=jQuery("#detail").getRowData(mya[0]); // Get First row to get the labels var colNames=new Array(); var ii=0; for (var i in data){colNames[ii++]=i;} // capture col names var html=""; for(i=0;i } html=html+"\\n"; // end of line at the end document.forms[0].method='POST'; document.forms[0].action='ajax/csvExport.php'; // send it to server which will open this contents in excel file document.forms[0].target='_blank'; document.forms[0].csvBuffer.value=html; document.forms[0].submit(); }

    Read the article

  • Jqgrid search option hides the grid table

    - by Felix Guerrero
    The issue is when I click on search option (on pager) it shows the search window but the grid gets hide. I'm including the jqmodal.js file. But what I'm ignoring on the code below? css files: jqModal.css jquery-ui-1.8.custom.css ui.jqgrid.css ui.multiselect.css jquery.searchFilter.css js files: jquery.min.js grid.base.js grid.common.js grid.formedit.js grid.setcolumns.js ui.multiselect.js jquery.searchFilter.js jqModal.js The Javascript: $("#list").jqGrid({ url: 'foo_report.php?g=' + $('#fooselect').val() + '&report=1&searchString=null&searchField=null&searchOper=null', datatype: 'json', mtype: 'GET', colNames: ['foo1','foo2', 'foo3'], colModel: [ { name:'rows.foobar1', index: 'foobar1', search:true, jsonmap: 'foobar1', width: 150, align: 'left', sortable:true}, { name:'rows.foobar2', index: 'foobar2', jsonmap: 'foobar2', width: 150, align: 'left'}, { name:'rows.foobar3', index: 'foobar3', jsonmap: 'foobar3', width: 240, align: 'left', sortable: true}], pager: '#pager', rowNum: 8, autowidth: true, rowList: [8, 16], sortname: 'foobar1', sortorder: 'asc', viewrecords: true, search : { caption: "Search...", Find: "Find", Reset: "Reset", odata : ['equal', 'not equal', 'less'], groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" }], matchText: " match", rulesText: " rules" }, caption: 'Foobar Data', jsonReader : { root: "rows", repeatitems: false }, height: 350, width: 800 }); html: <table id="list"></table> <div id="pager"></div>

    Read the article

  • JQGrid datatype as Ajax function not getting called

    - by mraman
    Hi, JQGrid datatype as Ajax function not getting called. once i tried to debug using firebug, found out that those lines are not exectuced. please let me know the issue with my code. Thanks in advance. jQuery("#list").jqGrid({ //url:'example.xml', datatype: function() { $.ajax({ url: "example.xml", data: "{}", dataType: "xml", mtype: "GET", complete: function(jsondata, stat) { alert((jsondata.responseText)); if (stat == "success") { alert("ew"); } }, error : function () {alert("error")} }); }, colNames:['QueueName','SLA Associated', 'SLA met', 'SLA Breached', 'SLA MET %', 'SLA Breached %'], colModel :[ {name:'QueueName',index:'QueueName', width:150}, {name:'SLAAssociated',index:'SLAAssociated', width:150}, {name:'SLAmet',index:'SLAmet', width:150}, {name:'SLABreached',index:'SLABreached', width:150}, {name:'SLAMETPer',index:'SLAMETPer', width:150}, {name:'SLABreachedPer',index:'SLABreachedPer', width:150} ], pager: jQuery('#pager1'), rowNum:1, rowList:[5,10], imgpath: 'themes/basic/images' }); in Header i add as follows <html xmlns="http://www.w3.org/1999/xhtml"> <link rel="stylesheet" type="text/css" media="screen" href="themes/basic/grid.css" /> <link rel="stylesheet" type="text/css" media="screen" href="themes/jqModal.css" /> <link rel="stylesheet" type="text/css" media="screen" href="css/report.css" /> <script src="jquery.js" type="text/javascript"></script> <script src="jquery.jqGrid.js" type="text/javascript"></script> <script src="js/jqModal.js" type="text/javascript"></script> <script src="js/jqDnR.js" type="text/javascript"></script>

    Read the article

  • Jqgrid search option not working and edit popups not closed after submit

    - by Sajith
    i have facing two problem in Jqgrid. Search option not working and there is not closed editpopups after submit. my code below <table id="jQGridpending" style="width:auto"> </table> <div id="jQGridpendingPager"> </div> <table id="searchpending"></table> <div id="filterpending"></div> jQuery("#jQGridpending").jqGrid({ url: '@Url.Action("DiscountRequest", "Admin")', datatype: "json", mtype: "POST", colNames: [ "Id", "ClientName", "BpName", "Pdt", "DiscountReq", "DiscountAllowed", "Status", ], colModel: [ { name: "Id", width: 100, key: true, formatter: "integer", sorttype: "integer", hidden: true }, { name: "ClientName", width: 150, sortable: true,search:true,stype:'text', editrules: { required: false } }, { name: "BpName", width: 200, sortable: true, editable: false, editrules: { required: false } }, { name: "Pdt", width: 150, sortable: true, editable: false, editrules: { required: false } }, { name: "DiscountReq", width: 150, sortable: false, editable: false, editrules: { required: false } }, { name: "DiscountAllowed", width: 200, sortable: true, editable: true, editrules: { required: true } }, { name: 'Status', index: 'Status', width: 200, sortable: false, editable: true, formatter: 'select', edittype: 'select', editoptions: { value: "pending:pending;approved:approved;rejected:rejected" } }, @* { name: "Status", width: 200, sortable: false, editable: true, editrules: { required: true, minValue: 1, }, edittype: "select", editoptions: { async: false, dataUrl: "@Url.Action("GetStatus", "Admin")", buildSelect: function (response) { var s = "<select>"; s += '<option value="0">--Select--</option><option value="pending">pending</option>'; return s + "</select>"; } } },*@ //{ name: "Status", width: 150, sortable: true, editable: true, editrules: { required: true } }, //{ name: "Created", width: 120, formatter: "date", formatoptions: { srcformat: "ISO8601Long", newformat: "n/j/Y g:i:s A" }, align: "center", sorttype: "date" }, ], loadtext: "Processing pending request data please wait...", rowNum: 10, gridview: true, autoencode: true, loadonce: true, height: "auto", rownumbers: true, prmNames: { id: "Id" }, rowList: [10, 20, 30], pager: '#jQGridpendingPager', sortname: 'id', sortorder: "asc", viewrecords: true, jqModal: true, caption: "Pending List", reloadAfterSubmit: true, editurl: '@Url.Action("UpdateDiscount", "Admin")', }); jQuery("#jQGridpending").jqGrid('navGrid', '#jQGridpendingPager', { search: true,recreateFilter: true, add: false, searchtext: "Search", edittext: "Edit", deltext: "Delete", }, {//EDIT url: '@Url.Action("UpdateDiscount", "Admin")', width: "auto", jqModal: true, closeOnEscape: true, closeAfterEdit: true, reloadAfterSubmit: true, afterSubmit: function () { // Reload grid records after edit a entry in the db. $(this).jqGrid('setGridParam', { datatype: 'json' }); return [true, '', false]; }, }, {//DELETE url: '@Url.Action("DelDiscount", "Admin")', closeOnEscape: true }, {//SEARCH closeOnEscape: true, searchOnEnter: true, multipleSearch: true, //overlay: 0, width: "auto", height: "auto", });

    Read the article

  • Web Site Performance and Assembly Versioning

    - by capgpilk
    I originally wanted to write this post in one, but there is quite a large amount of information which can be broken down into different areas, so I am going to publish it in three posts. Minification and Concatination of JavaScript and CSS Files – this post Versioning Combined Files Using Subversion – published shortly Versioning Combined Files Using Mercurial – published shortly Website Performance There are many ways to improve web site performance, two areas are reducing the amount of data that is served up from the web server and reducing the number of files that are requested. Here I will outline the process of minimizing and concatenating your javascript and css files automatically at build time of your visual studio web site/ application. To edit the project file in Visual Studio, you need to first unload it by right clicking the project in Solution Explorer. I prefer to do this in a third party tool such as Notepad++ and save it there forcing VS to reload it each time I make a change as the whole process in Visual Studio can be a bit tedious. Now you have the project file, you will notice that it is an MSBuild project file. I am going to use a fantastic utility from Microsoft called Ajax Minifier. This tool minifies both javascript and css. 1. Import the tasks for AjaxMin choosing the location you installed to. I keep all third party utilities in a Tools directory within my solution structure and source control. This way I know I can get the entire solution from source control without worrying about what other tools I need to get the project to build locally. 1: <Import Project="..\Tools\MicrosoftAjaxMinifier\AjaxMin.tasks" /> 2. Now create ItemGroups for all your js and css files like this. Separating out your non minified files and minified files. This can go in the AfterBuild container. 1: <Target Name="AfterBuild"> 2:  3: <!-- Javascript files that need minimizing --> 4: <ItemGroup> 5: <JSMin Include="Scripts\jqModal.js" /> 6: <JSMin Include="Scripts\jquery.jcarousel.js" /> 7: <JSMin Include="Scripts\shadowbox.js" /> 8: </ItemGroup> 9: <!-- CSS files that need minimizing --> 10: <ItemGroup> 11: <CSSMin Include="Content\Site.css" /> 12: <CSSMin Include="Content\themes\base\jquery-ui.css" /> 13: <CSSMin Include="Content\shadowbox.css" /> 14: </ItemGroup>   1: <!-- Javascript files to combine --> 2: <ItemGroup> 3: <JSCat Include="Scripts\jqModal.min.js" /> 4: <JSCat Include="Scripts\jquery.jcarousel.min.js" /> 5: <JSCat Include="Scripts\shadowbox.min.js" /> 6: </ItemGroup> 7: <!-- CSS files to combine --> 8: <ItemGroup> 9: <CSSCat Include="Content\Site.min.css" /> 10: <CSSCat Include="Content\themes\base\jquery-ui.min.css" /> 11: <CSSCat Include="Content\shadowbox.min.css" /> 12: </ItemGroup>   3. Call AjaxMin to do the crunching. 1: <Message Text="Minimizing JS and CSS Files..." Importance="High" /> 2: <AjaxMin JsSourceFiles="@(JSMin)" JsSourceExtensionPattern="\.js$" 3: JsTargetExtension=".min.js" JsEvalTreatment="MakeImmediateSafe" 4: CssSourceFiles="@(CSSMin)" CssSourceExtensionPattern="\.css$" 5: CssTargetExtension=".min.css" /> This will create the *.min.css and *.min.js files in the same directory the original files were. 4. Now concatenate the minified files into one for javascript and another for css. Here we write out the files with a default file name. In later posts I will cover versioning these files the same as your project assembly again to help performance. 1: <Message Text="Concat JS Files..." Importance="High" /> 2: <ReadLinesFromFile File="%(JSCat.Identity)"> 3: <Output TaskParameter="Lines" ItemName="JSLinesSite" /> 4: </ReadLinesFromFile> 5: <WriteLinestoFile File="Scripts\site-script.combined.min.js" Lines="@(JSLinesSite)" 6: Overwrite="true" /> 7: <Message Text="Concat CSS Files..." Importance="High" /> 8: <ReadLinesFromFile File="%(CSSCat.Identity)"> 9: <Output TaskParameter="Lines" ItemName="CSSLinesSite" /> 10: </ReadLinesFromFile> 11: <WriteLinestoFile File="Content\site-style.combined.min.css" Lines="@(CSSLinesSite)" 12: Overwrite="true" /> 5. Save the project file, if you have Visual Studio open it will ask you to reload the project. You can now run a build and these minified and combined files will be created automatically. 6. Finally reference these minified combined files in your web page. In the next two posts I will cover versioning these files to match your assembly.

    Read the article

  • JqGrid addJSONData + ASP.NET 2.0 WS

    - by MilosC
    Dear community ! I am a bit lost. I' ve tried to implement a solution based on JqGrid and tried to use function as datatype. I've setted all by the book i guess, i get WS invoked and get JASON back, I got succes on clientside in ajaf call and i "bind" jqGrid using addJSONData but grid remains empty. I do not have any glue now... other "local" samples on same pages works without a problem (jsonstring ...) My WS method looks like : [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public string GetGridData() { // Load a list InitSessionVariables(); SA.DB.DenarnaEnota.DenarnaEnotaDB db = new SAOP.SA.DB.DenarnaEnota.DenarnaEnotaDB(); DataSet ds = db.GetLookupForDenarnaEnota(SAOP.FW.DB.RecordStatus.All); // Turn into HTML friendly format GetGridData summaryList = new GetGridData(); summaryList.page = "1"; summaryList.total = "10"; summaryList.records = "160"; int i = 0; foreach (DataRow dr in ds.Tables[0].Rows) { GridRows row = new GridRows(); row.id = dr["DenarnaEnotaID"].ToString(); row.cell = "[" + "\"" + dr["DenarnaEnotaID"].ToString() + "\"" + "," + "\"" + dr["Kratica"].ToString() + "\"" + "," + "\"" + dr["Naziv"].ToString() + "\"" + "," + "\"" + dr["Sifra"].ToString() + "\"" + "]"; summaryList.rows.Add(row); } return JsonConvert.SerializeObject(summaryList); } my ASCX code is this: jQuery(document).ready(function(){ jQuery("#list").jqGrid({ datatype : function (postdata) { jQuery.ajax({ url:'../../AjaxWS/TemeljnicaEdit.asmx/GetGridData', data:'{}', dataType:'json', type: 'POST', contentType: "application/json; charset=utf-8", complete: function(jsondata,stat){ if(stat=="success") { var clearJson = jsondata.responseText; var thegrid = jQuery("#list")[0]; var myjsongrid = eval('('+clearJson+')'); alfs thegrid.addJSONData(myjsongrid.replace(/\\/g,'')); } } } ); }, colNames:['DenarnaEnotaID','Kratica', 'Sifra', 'Naziv'], colModel:[ {name:'DenarnaEnotaID',index:'DenarnaEnotaID', width:100}, {name:'Kratica',index:'Kratica', width:100}, {name:'Sifra',index:'Sifra', width:100}, {name:'Naziv',index:'Naziv', width:100}], rowNum:15, rowList:[15,30,100], pager: jQuery('#pager'), sortname: 'id', // loadtext:"Nalagam zapise...", // viewrecords: true, sortorder: "desc", // caption:"Vrstice", // width:"800", imgpath: "../Scripts/JGrid/themes/basic/images"}); }); from WS i GET JSON like this: {”page”:”1?,”total”:”10?,”records”:”160?,”rows”:[{"id":"18","cell":"["18","BAM","Konvertibilna marka","977"]“},{”id”:”19?,”cell”:”["19","RSD","Srbski dinar","941"]“},{”id”:”20?,”cell”:”["20","AFN","Afgani","971"]“},{”id”:”21?,”cell”:”["21","ALL","Lek","008"]“},{”id”:”22?,”cell”:”["22","DZD","Alžirski dinar","012"]“},{”id”:”23?,”cell”:”["23","AOA","Kvanza","973"]“},{”id”:”24?,”cell”:”["24","XCD","Vzhodnokaribski dolar","951"]“},{”id”:”25?,”cell”:” ……………… ["13","PLN","Poljski zlot","985"]“},{”id”:”14?,”cell”:”["14","SEK","Švedska krona","752"]“},{”id”:”15?,”cell”:”["15","SKK","Slovaška krona","703"]“},{”id”:”16?,”cell”:”["16","USD","Ameriški dolar","840"]“},{”id”:”17?,”cell”:”["17","XXX","Nobena valuta","000"]“},{”id”:”1?,”cell”:”["1","SIT","Slovenski tolar","705"]“}]} i have registered this js : clientSideScripts.RegisterClientScriptFile("prototype.js", CommonFunctions.FixupUrlWithoutSessionID("~/WebUI/Scripts/prototype-1.6.0.2.js")); clientSideScripts.RegisterClientScriptFile("jquery.js", CommonFunctions.FixupUrlWithoutSessionID("~/WebUI/Scripts/JGrid/jquery.js")); clientSideScripts.RegisterClientScriptFile("jquery.jqGrid.js", CommonFunctions.FixupUrlWithoutSessionID("~/WebUI/Scripts/JGrid/jquery.jqGrid.js")); clientSideScripts.RegisterClientScriptFile("jqModal.js", CommonFunctions.FixupUrlWithoutSessionID("~/WebUI/Scripts/JGrid/js/jqModal.js")); clientSideScripts.RegisterClientScriptFile("jqDnR.js", CommonFunctions.FixupUrlWithoutSessionID("~/WebUI/Scripts/JGrid/js/jqDnR.js")); Basical i think it must be something stupid ...but i can figure it out now... Help wanted.

    Read the article

  • jqgrid scrollable dialog

    - by gurun8
    I have a jqGrid that has add/edit dialogs with a form that's longer than the dialog height but the dialog won't scroll. I've tried to add an overflow: auto style to the dialog but no effect: $("div.ui-jqdialog-content").css("overflow", "auto"); Although, if I change auto to scroll, I at least see a scrollbar but still no scrolling: $("div.ui-jqdialog-content").css("overflow", "scroll"); This at least gives me a small glimmer of hope that I'm on the right track. There doesn't seem to be any direction from the API documentation to support scrolling: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing Does anyone know how to add a working scrollbar to the jqModal dialog window used by jqGrid?

    Read the article

  • Rails Asset Caching Breaks First few page loads

    - by Brian Armstrong
    We're using Rails asset caching for JS and CSS like this: <%= javascript_include_tag :defaults, 'autocomplete', 'searchbox', 'jqmodal', :cache => set_asset_cache(:admins) %> In our deploy we call rake tmp:assets:clear each time. The problem is that the first few page loads after a deploy come up with no css on the page. I guess until the cached all.js and all.css have been regenerated. We deploy many times per day and this is scary for any users who happen to come across a busted page. Have people found any way to make this smoother so the new cached assets are guaranteed to be there on the first new page load?

    Read the article

  • how to reload jqgrid in asp.net mvc when i change dropdownlist

    - by sandeep
    what is wrong in this code? when i change drop down list,the grid takes old value of ddl only, not taken newely selected values why? <%--<asp:Content ID="Content2script" ContentPlaceHolderID="HeadScript" runat="server"> <script type="text/javascript"> $(function() { $("#StateId").change(function() { $('#TheForm').submit(); }); }); $(function() { $("#CityId").change(function() { $('#TheForm').submit(); }); }); $(function() { $("#HospitalName").change(function() { $('#TheForm').submit(); }); }); </script > </asp:Content>--%> <asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server"> <link rel="stylesheet" type="text/css" href="/scripts/themes/coffee/grid.css" title="coffee" media="screen" /> <script src="/Scripts/jquery-1.3.2.js" type="text/javascript"></script> <script src="/Scripts/jquery.jqGrid.js" type="text/javascript"></script> <script src="/Scripts/js/jqModal.js" type="text/javascript"></script> <script src="/Scripts/js/jqDnR.js" type="text/javascript"></script> <script type="text/javascript"> var gridimgpath = '/scripts/themes/coffee/images'; var gridDataUrl = '/Claim/DynamicGridData/'; jQuery(document).ready(function() { // $("#btnSearch").click(function() { var StateId = document.getElementById('StateId').value; var CityId = document.getElementById('CityId').value; var HName = document.getElementById('HospitalName').value; // alert(CityId); // alert(StateId); // alert(HName); if (StateId > 0 && CityId == '' && HName == '') { CityId = 0; HName = 'Default'.toString(); // alert("elseif0" + HName.toString()); } else if (CityId > 0 && StateId == '') { // alert("elseif1"); alert("Please Select State..") } else if (CityId > 0 && StateId > 0 && HName == '') { // alert("elseif2"); alert(CityId); alert(StateId); HName = "Default"; } else { // alert("else"); StateId = 0; CityId = 0; HName = "Default"; } jQuery("#list").jqGrid({ url: gridDataUrl + '?StateId=' + StateId + '&CityId=' + CityId + '&hospname=' + HName, datatype: 'json', mtype: 'GET', colNames: ['Id', 'HospitalName', 'Address', 'City', 'District', 'FaxNumber', 'PhoneNumber'], colModel: [{ name: 'HospitalId', index: 'HospitalId', width: 40, align: 'left' }, { name: 'HospitalName', index: 'HospitalName', width: 40, align: 'left' }, { name: 'Address1', Address: 'Address1', width: 300 }, { name: 'CityName', index: 'CityName', width: 100 }, { name: 'DistName', index: 'DistName', width: 100 }, { name: 'FaxNo', index: 'FaxNo', width: 100 }, { name: 'ContactNo1', index: 'PhoneNumber', width: 100 } ], pager: jQuery('#pager'), rowNum: 10, rowList: [5, 10, 20, 50], // sortname: 'Id,', sortname: '1', sortorder: "asc", viewrecords: true, //multiselect: true, //multikey: "ctrlKey", // imgpath: '/scripts/themes/coffee/images', imgpath: gridimgpath, caption: 'Hospital Search', width: 700, height: 250 }); $(function() { // $("#btnSearch").click(function() { $('#CityId').change(function() { alert("kjasd"); // Set the vars whenever the date range changes and then filter the results StateId = document.getElementById('StateId').value; CityId = document.getElementById('CityId').value; HName = 'default'; setGridUrl(); }); // Set the date range textbox values $('#StateId').val(StateId.toString()); $('#CityId').val(CityId.toString()); // Set the grid json url to get the data to display setGridUrl(); }); function setGridUrl() { alert(StateId); alert(CityId); alert("hi"); var newGridDataUrl = gridDataUrl + '?StateId=' + StateId + '&CityId=' + CityId + '&hospname=' + HName; jQuery('#list').jqGrid('setGridParam', { url: newGridDataUrl }).trigger("reloadGrid"); } // }); }); </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <%--<%using (Html.BeginForm("HospitalSearch", "Claim", FormMethod.Post, new { id = "TheForm" })) --%> <table cellspacing="0" cellpadding="2" width="100%" border="0" > <tr> <td class ="Heading1"> Hospital Search</td> <td class ="Heading1" align="right" width="50%" background="../images/homebg.gif"> &nbsp; </td> </tr> <tr> <td colspan="2" > <% Html.RenderPartial("InsuredDetails"); %> </td> </tr> <tr> <td colspan="2"> <table width="100%"> <tr> <td class="subline" valign="middle"> State : <% =Html.DropDownList("StateId", (SelectList)ViewData["States"], "--Select--", new { @class = "ddownmenu" })%> &nbsp; City : <% =Html.DropDownList("CityId", (SelectList)ViewData["Cities"], "--Select--", new { @class = "ddownmenu" })%> &nbsp; Hospital Name : <% =Html.TextBox("HospitalName")%> &nbsp; &nbsp; <input id="btnSearch" type="submit" value="Search" /> </td> </tr> </table> </td> </tr> <tr> <td align="center" colspan="2"> &nbsp;</td> </tr> </table> <div id="jqGridContainer"> <table id="list" class="scroll" cellpadding="0" cellspacing="0"></table> <div id="pager" class="scroll" style="text-align:center;"></div> </div> </asp:Content>

    Read the article

1