Pass a 2D-array with AJAX Programming Web Development by Oxiegen …].value; var dob = document.Form1.elements['txtDOB' + id].value; <ajaxcode>.CB_Function(regid,appnr,floor,unitplac,consid,unitnr,unitset,fuse….elements['txtDOB' + id].value; if (On_Error == true) { return; } id++; } <ajaxcode>.CB_Function(arrApps,nrapps,ServerSide_Callback2); [/CODE] I've read that… Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen …); // This line gets halted and displays a 'Undefined' error <ajaxcode>.CB_Function(jsonString,ServerSide_Callback2); } function objectify() { var o = {}; var frms… Re: Onclick does not work in ie for multiple object Programming Web Development by shaikh_mshariq …+"'"; nodeTable.setAttribute('onClick','sendToServe('+ipbkup+')');//generic method in ajaxcode.js nodeTable.onMouseOver="javascript:this.style.cursor='pointer'"… Re: Cascading Dropdown list with (AJAX, PHP) Programming Web Development by badbart … helpful. Here is what's in the attached zip: [B]AjaxCode.js[/B] - this is essentially the same as the other… Re: Cascading Dropdown list with (AJAX, PHP) Programming Web Development by badbart … helpful. Here is what's in the attached zip: [B]AjaxCode.js[/B] - this is essentially the same as the other… Re: Pass a 2D-array with AJAX Programming Web Development by ~s.o.s~ Look into [url=http://json.org/js.html]JSON[/url] for shipping data back and forth between your server and Javascript. It has become a de-facto standard like XML for shipping data in a platform / language agnostic manner. Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen I'll look into it. Thanks. Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen JSON look promising. I like the fact that it can contain an array. But how to create a dynamic JSON object containing multiples. My guess would be that the object needs to have the form: [CODE]var myJSONObject = {"bindings1": [ {"ircEvent": "PRIVMSG", "method": "newURI", "regex&… Re: Pass a 2D-array with AJAX Programming Web Development by ~s.o.s~ > Am I right? Yes, you can have nesting of arbitrary depths as long as it follows the key-value pair format where key is always a string and value can be either a string, number, array, another object, true, false or null. > And how would I go about to access these values from codebehind? (ASP.NET) Take a look at the [url=http://sourceforge.… Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen Everything about JSON looks interesting and workable. But I'm new to JSON and used to passing information between functions using arguments. So, I'm gonna need a little hand-holding and guidance here. :) On server-side i'm using AjaxPro by Michael Schwartz, which has built-in features for parsing JSON. And on client-side i've just added the … Re: Pass a 2D-array with AJAX Programming Web Development by ~s.o.s~ Here is a crude snippet: [code] <html> <head> <title>Forms</title> <script type="text/javascript"> function objectify() { var o = {}; var frms = document.forms; /* loop through all the form objects */ for(var i = 0, maxI = frms.length; i < maxI; ++i) { var frm = frms[i]; var elms = frm.… Re: Pass a 2D-array with AJAX Programming Web Development by ~s.o.s~ Did you include the 'json2.js' script at the top of your page? It must be the only reason or it has got something to do with your HTML file since stringify() works for me. [code] <html> <head> <title>Forms</title> <script type="text/javascript" src="json2.js"></script> <script type="… Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen Yes, actually I did. But I'll have to look it over again. The weird part is that when I debug using Firebug you can choose what js-script to debug and step through and I can clearly see the file and path. But in Firebug, the code of 'json2.js' doesn't contain any javascript code. Re: Pass a 2D-array with AJAX Programming Web Development by ~s.o.s~ There is either a problem with your markup or the way you are using / including Javascript. Did you try the snippet pasted by me in the above post? Did it work for you? Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen I'm sorry. I haven't had the chance to try anything today. But as soon as I do, I'll post my findings. Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen Ok. Now I'm back from the holidays and could check my code. I found that I missed a quote-mark. Now there are no errors, but there still seem to be something odd happening. In the screenshot, in the attached image, you can see two dynamically created forms marked form1 and form2. After the calls to the functions [I]objectify[/I] and [i]JSON.… Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen Hello? Am I forgotten? Re: Pass a 2D-array with AJAX Programming Web Development by ~s.o.s~ Paste only the relevant and indented code. Sifting through 50+ lines of unindented code is more of a bother. As far as your problem is concerned, I don't see any name attribute assigned to your form elements and the algorithm I posted uses element names. Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen Sorry about that. Won't happen again. I'll try your solution by adding the name element. But I was just thinking. If that's the reason why it won't work, then why does the code capture and hold the string in the last form element of each row and not the others? Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen Ok. So it works. I now get a correct json string. Now I'll have to figure out how to Deserialize(?) it in server code-behind into a a use-able .NET object/class/structure. Any suggestions? Re: Pass a 2D-array with AJAX Programming Web Development by ~s.o.s~ Use any C# JSON binding library which converts from JSON objects to C# objects and vice versa. The bottom section of the [URL="http://www.json.org/"]JSON home page[/URL] has a lot of bindings for the C# language. [URL="http://litjson.sourceforge.net/"]LitJSON [/URL]is one of those libraries you can use. Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen I tried LitJSON only to find out that it's probably compiled using .NET 2.0. I'm working in 1.1. In my latest attempt I used Jayrock. And i've also been ripping my hair out trying to get the method JavaScriptDeserializerFromJson in AjaxPro to do my bidding. No suck luck. I'm trying to convert the json string into a .NET object in the form of … Re: Pass a 2D-array with AJAX Programming Web Development by ~s.o.s~ > Am I doing something wrong or am i totally incompetent? You are probably asking this question in the wrong forum. This question has no longer remained a Javascript one since you have been successfully able to send the JSON encoded string to the server. The way you decode the string on the server is purely dependent on your server side … Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen Perhaps that is the case. But on the other hand. The fact that this forum also is about Ajax may be of relevance since that, for me, includes both client-side and server-side coding. Re: Pass a 2D-array with AJAX Programming Web Development by Oxiegen Problem solved. Instead of using a JSON string I used a DataTable. Appearantly AjaxPro supports using .NET objects as arguments and converts them into appropriate javascript objects. Thank you very much for all your assistance. Couldn't have done it without you. Thank you, thank you, thank you!!! Re: Pass a 2D-array with AJAX Programming Web Development by ~s.o.s~ > Thank you, thank you, thank you!!! You are welcome. :-)