ajax,arrays,knockout.jsView the original page-Collection of common programming errors

UnKnown Error


  • teresko
    jquery ajax asp.net-mvc 2014-2-17 0:46:36
    I have the below code which runs when an option in the drop down list is changed:function ddlSqlList_onchange(listItemId) {$.get(‘/SqlReportList/SqlQuery’, { “listItemId”: listItemId },function (data) { alert(‘succeeded’); $(‘#tbSqlQuery’).text(data); });}”SqlReportList” is my Controller, SqlQuery is an Action and listItemId is an input parameter for that action.public string SqlQuery(string listItemId){ // code here }It works locally fine but when deployed unto our dev server, it doesn’

  • Juhana
    ajax silverlight flex 2014-2-16 12:06:08
    Ajax, Flex and Silverlight are a few ways to make more interactive web applications. What kinds of factors would you consider when deciding which to use for a new web application? Does any one of them offer better cross-platform compatibility, performance, developer tools or community support?

  • zombat
    asp.net ajax silverlight 2014-2-16 9:44:42
    What’s the advantage of one over the other? I am so tempted to implement everything in silverlight now, so is ASP.NET, in particular, with Ajax, going to be dead?For an enterprise solution especially, with 100+ views and 1000+ pages, is it still feasible?Why isn’t silverlight adopted that much by most enterprises? It is mostly used for videos and galleries, etc.Cheers

  • Hailwood
    javascript ajax file-upload plupload 2014-2-16 8:07:53
    I am trying to limit the file extensions that can uploaded through plupload.because the filters do not work properly with the HTML5 runtime I cannot use them. hence I have the below code binded to the FilesAdded eventvar extensionArray = [‘pdf’, ‘doc’, ‘docx’, ‘xls’, ‘xlsx’, ‘ppt’, ‘pptx’]; uploader.bind(‘FilesAdded’, function (up, files) {var invalid = 0;for (var i in files) {var extension = files[i].name.substr((files[i].name.lastIndexOf(‘.’) + 1)).toLowerCase();if (extension == ” || -1 ===

  • Mowgli
    ajax jsf jsf-2 el composite-component 2014-2-16 6:42:07
    Problem: I am passing an EL expression to a composite component, but the EL expression is being evaluated from inside the composite component, rather than before. The intention being that the EL expression evaluates to a string with is sent to the composite component.I have a composite component, MenuTable:<cc:interface><cc:attribute name=”model” type=”nz.co.tradeintel.web.MenuTable”/><cc.attribute name=”updateId” /> </cc:interface><cc:implementation><h:panelGro

  • Chris
    c# asp.net ajax autocompleteextender 2014-2-16 3:18:32
    I’m currently working on a project where I need to use a lot of AJAX AutoCompleteExtenders, and they have been working fine- but now I’m tidying up the code and implementing a master page, I’m running into issues. I have this JS:$find(‘txtName’)._onMethodComplete = function(result, context) {$find(‘txtName’)._update(context, result, false); webservice_callback(result,context); };And when I load the page, this error occurs relating to that snippet:Microsoft JScript runtime error: ‘null’ is null o

  • boyd
    jquery ajax post tiles world-map 2014-2-13 11:27:06
    I’m trying to create a tile based world map like Tribal Wars has or The-West games. I created a little bit of it but it loads too slow when you drag the map with your mouse.My algorithm works like this:On page load:load the tiles from 1 to 19(x1 to y1 and x2 to y2) via JQuery’s $.post method(I need the screen’s width and height for that 19=1900/tile_width, because I want the map to fill the entire page) append the returned data(tiles) to the screen (so far so good)On map drag:load again via .pos

  • Muthuram
    jquery asp.net ajax 2014-2-13 9:23:06
    In My webApplication, i have load more than 2 userControls (.ascx) using Jquery Ajax. after loading the controls when postback happen on any button event i Receive this error. “Microsoft JScript runtime error: Unable to get value of the property ‘onsubmit’: object is null or undefined” Please suggest some ideas!

  • zanhtet
    asp.net html ajax 2014-2-13 6:50:49
    I created a asp.net page. The ajax rich text editor is contained in these page. Now, I publish the project. In runtime, I want to input a flash file into these text editor. I have found a button for flash input but I not seen this. I try to fill in html view of text editor but It is got an error. This is filled in html view.<object> <embed src=”../Test/test.swf”> </embed> </object>how can I solve this problem. Please help me.

  • Dominic Rodger
    jquery ajax 2014-2-13 3:27:51
    i want to call page content using $.get method that will call a page(.ascx) and render page content into div in current page(aspx) i have used something like this… didin’t work..<script type=”text/javascript”> function calltemp1() {var result = ”;$get(“/Views/Templates/_Temp1.ascx”,result)$(“#RecentstoryDiv”).html(result); } </script>above script gives jscript runtime error “object expected”.

  • mini-me
    c# arrays winapi struct 2014-2-17 2:22:16
    How do you declare a struct in C# with a fixed sized array of another struct ? I need this declared so that it works. Or is my approach wrong if I want the bitmapinfo (-header) created ?[StructLayout(LayoutKind.Sequential)] public struct RGBQUAD {public byte b;public byte g;public byte r;public byte reserved; }[StructLayout(LayoutKind.Sequential)] public struct BITMAPINFO {public BITMAPINFOHEADER bmiHeader;[MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.LPStruct, SizeConst = 1)

  • Dejwi
    c++ arrays vector c++11 stdvector 2014-2-17 0:48:43
    I’d like to use std::array from C++11 as a field of my own class. It takes two template parameters (first defines type of data, second defines size of an array).But I know the second parameter only in constructor. I’m not familiar with C++11 standard, but I suppose that it’s impossible to set a template parameter during execution.Are there any alternatives for std::array? std::vector is probably a little too much, cause I will never change the size of it.

  • Paul Bellora
    java arrays generics 2014-2-17 0:30:23
    I am trying to write a PriorityQueue which must be genericized to a Comparable. Here is the constructor:public class DavidiArrayPriorityQueue <E extends Comparable<E>> implements PriorityQueue<E> {private E data[];private int numElements;//creates an empty priority queue with 10 spaces by defaultpublic DavidiArrayPriorityQueue(){data= (E[]) new Object[20];numElements=0;}When I initialize it with DavidiArrayPriorityQueue<Integer> test=new DavidiArrayPriorityQueue<Intege

  • fmodos
    java arrays cellular-automata 2014-2-16 23:44:13
    I am trying to create an array of arrays of arrays etc…, except I don’t know how many nested levels deep it needs to be until runtime.Depending on the input, I might need either int[], int[][], int[][][][][][], or anything else. (For context, I am trying to construct an N-dimensional grid for a cellular automaton, where N is passed as a parameter.)I don’t have any code for you because I have no idea how to go about this; I suspect is not possible at all using just arrays. Any help, or alternat

  • templatetypedef
    arrays algorithm time-complexity space-complexity 2014-2-16 21:25:58
    You are given an array of integers. You have to output the largest range so that all numbers in the range are present in the array. The numbers might be present in any order. For example, suppose that the array is{2, 10, 3, 12, 5, 4, 11, 8, 7, 6, 15}Here we find two (nontrivial) ranges for which all the integers in these ranges are present in the array, namely [2,8] and [10,12]. Out of these [2,8] is the longer one. So we need to output that.When I was given this question, I was asked to do th

  • Micha
    python arrays numpy 2014-2-16 20:31:55
    I am working with data from netcdf files, with multi-dimensional variables, read into numpy arrays. I need to scan all values in all dimensions (axes in numpy) and alter some values. But, I don’t know in advance the dimension of any given variable. At runtime I can, of course, get the ndims and shapes of the numpy array. How can I program a loop thru all values without knowing the number of dimensions, or shapes in advance? If I knew a variable was exactly 2 dimensions, I would doshp=myarray.sha

  • Erx_VB.NExT.Coder
    arrays object collections vb6 compare 2014-2-16 19:00:04
    [The following is in VB6, and I have an Array of Collections that I would like to test to ensure something is of Type Collection]I’ve looked at some code I’ve written years ago, and I’m doing the following to see if it is a Collection or not:If TypeName(obj) = “Collection” Then ‘ Makes me feel uncomfortable.But, I don’t like the idea of doing String comparison (according to MSDN, degrades performance as well as making me feel uncomfortable) and would prefer to do something like this:If obj Is Co

  • Mihai Limba?an
    c++ arrays vector 2014-2-16 17:02:26
    In our C++ course they suggest not to use C++ arrays on new projects anymore. As far as I know Stroustroup himself suggests not to use arrays. But are there significant performance differences?

  • Dariusz Wozniak
    c# arrays exception-handling 2014-2-16 15:53:51
    My teacher has asked me to write a program in C# to handle “Array type mismatch exception”. But i couldn’t find anything in the net related to that. I just want to confirm if there exists something like that.

  • Chris Dennett
    java arrays random words 2014-2-16 15:47:54
    I wrote up a program that can sort words and determine any anagrams. I want to generate an array of random strings so that I can test my method’s runtime.public static String[] generateRandomWords(int numberOfWords){ String[] randomStrings = new String[numberOfWords]; Random random = Random();return null; }(method stub)I just want lowercase words of length 1-10. I read something about generating random numbers, then casting to char or something, but I didn’t totally understand. If someone can sh

  • Adam Hopkinson
    asp.net knockout.js 2014-2-15 2:23:05
    Is there a way i can call JavaScript function on data-bind like this:<span id=”lblSomePropVal” data-bind=”text: MySomeFunction(SomeProperty())” ></span>What i am trying to do is call MySomeFunction with the value of SomeProperty of my viewmodel. My SomeFunction will return some text based on value passed and that will be displayed in the span lblSomePropVal.I tried it the way i have written in the example but it throws binding error.Am i missing something here or is there any other w

  • Paul Hinett
    knockout.js asp.net-web-api model-binding 2014-2-15 0:48:44
    I have a requirement for users to edit a list of quotes for a lead, the quotes can be different types such as:QuoteForProductTypeA QuoteForProductTypeBAll quote types share a common base class, such as QuoteBase.I have my quotes displaying fine on the front end, and appear to post back the correct data too.However, on the server it doesn’t obviously doesn’t know which subclass to use, so just uses the base class.I think i need some kind of custom model binder for WebApi to check for a hidden f

  • nemesv
    knockout.js 2014-2-14 0:21:18
    I am beginner in knockout, while doing samples I got error message while trying to browse my page.0x800a1391 – JavaScript runtime error: ItemToEdit is undefinedbelow is my code:$(function () {countries = [{name: France}, {name: Germany}, {name: Spain}];var viewmodel = {table: ko.observableArray(countries),ItemToEdit: function () {var editedItem = ko.dataFor(this);},};});My HTML :<a href=”#” data-bind=”click :ItemToEdit”>Edit</a>

  • Zaid Iqbal
    html pdf browser knockout.js file-download 2014-2-13 0:25:36
    I have a file in my server with file name “Acuna,_Toribio_L..pdf” but when i click on the the hyperlink it throws an runtime exception.My URL is “http://someserver.com/files/uploads/ClientApplications/Acuna,_Toribio_L..pdf”My htmml code is <ul class=”attachmentFiles” data-bind=’template: { foreach: HRBC.controllers.clientApplications.list.data }’ id=”clientApplicationsGrid”><li data-bind=”attr: { id: ‘listItem’ + Id() }”><a target=”_blank” data-bind=”attr: { href: applicationPath

  • Travis
    knockout.js typescript 2014-2-11 14:11:37
    In knockout-2.2.d.ts we have:interface KnockoutObservableAny extends KnockoutObservableBase {(): any;(value): void; }I understand that (): is used to declare a function with an empty parameter list and a return type after the colon.However I don’t understand the lack of a function identifier in front of the brackets.I would have expected something like functionName(): any; What does this “anonymous” function mean? How do I interpret this nameless function, thanks.

  • Will Gant
    javascript asp.net-mvc-4 knockout.js razor-2 2014-2-10 20:43:01
    First off, this code does work, but it gives me a low level of annoyance that I’d like to be rid of. I have a .cshtml page that is built using the razor syntax. There is a big, nasty, knockout object living behind the scenes to which many things on the page are bound. Currently, when instantiating that knockout model, I’m doing so by serializing the C# viewmodel object in question within a string literal like below.<script type=”text/javascript”>$(document).ready(function() {var data = @Ht

  • YMC
    visual-studio-2010 knockout.js 2014-2-9 7:08:18
    I like knockout.js, the only problem is Visual Studio knows nothing about this framework, so it does not prevent me from silly things like assigning some value to observable property with ‘=’ operator which makes it regular property, and it’s not easy to reveal at compile time and often at runtime even. I wonder is there any syntax checker/highlighter for Visual Studio 2010 that helps me prevent faults like this? What about VS 2011? It might be a great help for developers who are new to knockou

  • Charlie
    ajax html5 knockout.js 2014-2-8 23:44:17
    I’m using Knockout JS and have a main view and view model. I want a dialog (the jquery UI one) to popup with another view which a separate child view model to be bound to. The HTML for the dialog content is retreived using AJAX so I want to be able to call ko.applyBindings once the request has completed, and I want to bind the child view model to just the portion of the HTML loaded via ajax inside the dialog div.Is this actually possible or do I need to load ALL my views and view models when the

  • woggles
    knockout.js 2014-2-6 13:07:38
    Is this a knockout bug?<h2>Debugging Variables</h2> <div data-bind=”text: ko.toJSON($root, null, 2)”> </div>I get the following error when viewing my page in compatability mode: Microsoft JScript runtime error: Unable to parse bindings. Message:[object Error]; Bindings value: text: ko.toJSON($root, null, 2)Works fine when compatability mode is off.

  • Tomalak
    dependencies knockout.js 2014-2-2 13:59:45
    Is there a way in knockout.js to determinewhich values (ko.observable or ko.computed) depend on each other in what way (precedents/dependents) and which HTML nodes (text binding, for starters) depend on the current value1, so I can highlight them on screen.?1 This implies that I need a way to go from an HTML node to the connected ko.subscribable, not just to the view model, like ko.dataFor() does. This seems to be impossible as well.I’ve built a web application that works like a spreadsheet – m