Search Results

Search found 59301 results on 2373 pages for 'asp net ajax'.

Page 175/2373 | < Previous Page | 171 172 173 174 175 176 177 178 179 180 181 182  | Next Page >

  • Parsing a .NET DataSet returned from a .NET Web Service in Java

    - by Chris Dail
    I have to consume a .NET hosted web service from a Java application. Interoperability between the two is usually very good. The problem I'm running into is that the .NET application developer chose to expose data using the .NET DataSet object. There are lots of articles written as to why you should not do this and how it makes interoperability difficult: http://www.hanselman.com/blog/ReturningDataSetsFromWebServicesIsTheSpawnOfSatanAndRepresentsAllThatIsTrulyEvilInTheWorld.aspx http://www.lhotka.net/weblog/ThoughtsOnPassingDataSetObjectsViaWebServices.aspx http://aspnet.4guysfromrolla.com/articles/051805-1.aspx http://www.theserverside.net/tt/articles/showarticle.tss?id=Top5WSMistakes My problem is that despite this not being recommended practice, I am stuck with having to consume a web service returning a DataSet with Java. When you generate a proxy for something like this with anything other than .NET you basically end up with an object that looks like this: @XmlElement(namespace = "http://www.w3.org/2001/XMLSchema", required = true) protected Schema schema; @XmlAnyElement(lax = true) protected Object any; This first field is the actual schema that should describe the DataSet. When I process this using JAX-WS and JAXB in Java, it bring all of XS-Schema in as Java objects to be represented here. Walking the object tree of JAXB is possible but not pretty. The any field represents the raw XML for the DataSet that is in the schema specified by the schema. The structure of the dataset is pretty consistent but the data types do change. I need access to the type information and the schema does vary from call to call. I've though of a few options but none seem like 'good' options. Trying to generate Java objects from the schema using JAXB at runtime seems to be a bad idea. This would be way too slow since it would need to happen everytime. Brute force walk the schema tree using the JAXB objects that JAX-WS brought in. Maybe instead of using JAXB to parse the schema it would be easier to deal with it as XML and use XPath to try and find the type information I need. Are there other options I have not considered? Is there a Java library to parse DataSet objects easily? What have other people done who may have similar situations?

    Read the article

  • Ajax message best practices

    - by hhj
    Say I need to use ajax to asynchronously ask the server for an xml file containing relevant data. What is the best practice on what this message should look like? Should it be a string like get_data or something similar? Should it be xml? I don't really need long polling since its a one-time (or close to it) request. Thanks.

    Read the article

  • AJAX function to POST 4 variables

    - by kirgy
    Ive been having great frustration for hours now trying to remember my AJAX! Im trying to write a function which will be called that will simply POST 4 variables to a given URL, written in javascript and not jquery such as: function postVariables(URL, var1, var2, var3, var4) { ...... return true; } Can anyone help?

    Read the article

  • ajax and jsp integration

    - by kawtousse
    I want to capture the responseXML that i have built in my jsp. What should I do. after that i will transform it in html. I know this is annoying and we could do it with a framework or a library like jquery but i realize it with ajax. Also i have problems with jquery and jsp\servlet since i must use a JSON SERVICE. Why it seems to me that is so complicated.

    Read the article

  • Returning PHP Multi-Dimension Array to Javascript/AJAX

    - by GregH
    My understanding is that in order to return a complex PHP variable to Javascript, it should be done via AJAX and json_encode. Could somebody give me an actual example (both PHP and Javascript code) of this? Lets say we have the two-dim array in PHP: $twoDArr = array( array('Greg', 44, 'Owner'), array('Joe', 23, 'Renter'), array('Susan', 39, 'Owner'), array('John', 32, 'Renter) ); How would we return this to an analogous two dimensional array in javascript using json_encode?

    Read the article

  • Maintain Added List Item while binding from datasource

    - by Kronass
    Hi, I have a drop down list, and I added some items in it as follows <asp:DropDownList ID="ddlInsAuther" runat="server" DataSourceID="ObjectDataSourceInsAuthers" DataTextField="AutherName" DataValueField="AutherID"> <asp:ListItem Value="-1">No Authers</asp:ListItem> </asp:DropDownList> And in Datasource <asp:ObjectDataSource ID="ObjectDataSourceInsAuthers" runat="server" SelectMethod="GetAll" TypeName="MyProject.BusinessLayer.AuthersFactory"> </asp:ObjectDataSource> When it loads it clears the list and loads the new items, I don't want to make a custom binder on page load, how can I maintain my added items in the list while binding from datasource?

    Read the article

  • Populate a form from SQL

    - by xrum
    Hi, I am trying to populate a web from from a SQL table. This is what I have right now, though I am not sure if it's the best way to do things, please give me suggestions: Public Class userDetails Public address1 As String Public address2 As String Public city As String ... ... ... End Class Public Class clsPerson 'set SQL connection Dim objFormat As New clsFormat Dim objConn As New clsConn() Dim connStr As String = objConn.getConn() Dim myConnection As New Data.SqlClient.SqlConnection(connStr) Public Function GetPersonDetails() As userDetails 'connection and all other good stuff here Try ' Execute the command myConnection.Open() dr = myCommand.ExecuteReader() ' Make sure a record was returned If dr.Read() Then ' Create and Populate ApplicantDetails userDetails.address1 = dr("address1") userDetails.address2 = objFormat.CheckNull(dr("address2")) userDetails.city = objFormat.CheckNull(dr("city")) .... Else Err.Raise(4938, "clsUser", "Error in GetUserDetails - User Not Found") End If dr.Close() Finally myConnection.Close() End Try Return userDetails End Function i then use GetPersonDetails() function in my backend to populate the form. like so: Dim userDetails as new userDetails userdetails = getPersonDetails() txtAddress.text = userdetails.address1 etc.... however, there are like 50 fields in the User db, and it seems like a lot of retyping... please help me find a better way to do this. Thank you!

    Read the article

  • http error code 12019 in Ajax call

    - by Bas Hendriks
    Hi, When executing a ajax call i received a http error code 12019. This call works most of the time, but in rare occasions i get this errorcall. I found that this error code is described as "The requested operation cannot be carried out because the handle supplied is not in the correct state." (@msdn). Can anybody tell me what this means? Thanx, Bas Hendriks

    Read the article

  • Ajax doesn't trigger a change-event on a webkit based browser

    - by user319464
    I have adapted a Jquery plugin to for-fill my needs to send GET requests to servers as a way of "pinging" them. I've also added some javascript code to add some fancy features like: depending on the changed value in a that the Jquery plugin changes, it changes the Icon accordingly. To make it all work essentially, I made so that when Ajax gets a "complete" event, it forces a "onChange" event to the span, triggering the javascript validation function to change the status icons. Here is the code of my slightly modified jQuery Plugin: /** * ping for jQuery * * Adapted by Carroarmato0 (to actually work instead of randomly "pinging" nowhere instead of faking * * @auth Jessica * @link http://www.skiyo.cn/demo/jquery.ping/ * */ (function($) { $.fn.ping = function(options) { var opts = $.extend({}, $.fn.ping.defaults, options); return this.each(function() { var ping, requestTime, responseTime ; var target = $(this); var server = target.html(); target.html('<img src="img/loading.gif" alt="loading" />'); function ping() { $.ajax({url: 'http://' + server, type: 'GET', dataType: 'html', timeout: 30000, beforeSend : function() { requestTime = new Date().getTime(); }, complete : function() { responseTime = new Date().getTime(); ping = Math.abs(requestTime - responseTime); if (ping > 2000) { target.text('niet bereikbaar'); } else { target.text(ping + opts.unit); } target.change(); } }); } ping(); opts.interval != 0 && setInterval(ping,opts.interval * 1000); }); }; $.fn.ping.defaults = { interval: 3, unit: 'ms' }; })(jQuery); target.change(); is the code that triggers the "onchange" event in the span: echo " <td class=\"center\"><span id=\"ping$pingNb\" onChange=\"checkServerIcon(this)\" >" .$server['IP'] . "</span></td>"; In Firefox this works, checkServerIcon(this) gets executed and passes the span object to the function. function checkServerIcon(object) { var delayText = object.innerHTML; var delay = delayText.substring(0, delayText.length - 2); if ( isInteger(delay) ) { object.parentNode.previousSibling.parentNode.getElementsByTagName('img')[0].src = 'img/servers/enable_server.png'; } else { if (delay == "bezig.") { object.parentNode.previousSibling.parentNode.getElementsByTagName('img')[0].src = 'img/servers/search_server.png'; } else { object.parentNode.previousSibling.parentNode.getElementsByTagName('img')[0].src = 'img/servers/desable_server.png'; } } } My guess would be that there's something different in WebKit browsers in the way object.parentNode.previousSibling.parentNode. .... works...

    Read the article

  • Problems with Ajax Chat version .8.3

    - by Matt
    I am not sure why, but my Ajax Chatroom ever once in awhile (once time ever other day on average I'd say), displays an connection error 503. Now doing some digging apparently 503 is an error for exceeding max connections, and the typical fix is increasing your limit to something like 400 but my max connections is already set to 1500. That being said I would love some help on the issue as I cannot find any further info on it.

    Read the article

  • Google Maps within a dynamically loaded jquery Accordion

    - by marr75
    I'm trying to load a google map within a jquery ui accordion with contents loaded by ajax. $("h2", "#accordion").click(function(e) { var contentDiv = $(this).next("div"); if (contentDiv.children().length == 1) { contentDiv.load($(this).find("a").attr("href")); contentDiv.ready(function(){ var latlng = new google.maps.LatLng(-34.397, 150.644); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); }) } }); That's my current code (Google Maps API V3), but it redirects to the url of the href when I click currently, obviously with no google map because there's no javascript in this response. If I comment out the map line everything works fine (except the map itself).

    Read the article

  • Ajax frameworks small application

    - by Mona
    hi. I'm wondering if any of you have some ideas of a small application i can work on , just to get familiar with any of the Ajax Frameworks specially if it's related to Java like JMaki or ECHO 2 thanks .

    Read the article

  • jQuery UI autocomplete examples

    - by RUtt
    I'm hoping someone can help with this, I'm having a real difficult time getting jQueryUI's autocomplete to work with ajax in a asp.net app (not MVC). I can get it to make the ajax call but I'm not doing something right handling the response. Just for starters I'm trying to have autocomplete make an ajax call to 'GetSuggestions.aspx' which will return a hard coded string. I have it where it will make the call to GetSuggestions.aspx but I can't get it to return anything to the page. (My next step would be to have 'GetSuggestions.asxp' return a list of name/value pairs but I'll tackle that next). I'm using the example from here: http://jqueryui.com/demos/autocomplete/#remote with the exception of using 'source: "GetSuggestions.aspx" (instead of "search.php")

    Read the article

  • How to run & create a dll files.

    - by Gopal
    Using Visual Studio 2005 I download open source code from one site, when i try to run the source code, it showing error like Namespace & assembly references.... What are the procedure i have to do for this kind of errors.... And also i want to create a dll file by using this code. For Dll what are the procedure need to do? Need Help.

    Read the article

  • Ajax jquery async return value

    - by Sonny
    Hi, how can i make this code to don't pause the browser but still return value. You can rewrite this with new method of course. function get_char_val(merk) { var returnValue = null; $.ajax({ type: "POST", async: false, url: "char_info2.php", data: { name: merk }, dataType: "html", success: function(data) { returnValue = data; } }); return returnValue; } var px= get_char_val('x'); var py= get_char_val('y');

    Read the article

  • Ajax frameworks small apllication

    - by Mona
    hi. I'm wondering if any of you have some ideas of a small application i can work on , just to get familiar with any of the Ajax Frameworks specially if it's related to Java like JMaki or ECHO 2 thanks .

    Read the article

  • How best to implement "favourites" feature? (like favourite products on a data driven website)

    - by ClarkeyBoy
    Hi, I have written a dynamic database driven, object oriented website with an administration frontend etc etc. I would like to add a feature where customers can save items as "favourites", without having to create an account and login, to come back to them later, but I dont know how exactly to go about doing this... I see three options: Log favourites based on IP address and then change these to be logged against an account if the customer then creates an account; Force customers to create an account to be able to use this functionality; Log favourites based on IP address but give users the option to save their favourites under a name they specify. The problem with option 1 is that I dont know much about IP addresses - my Dad thinks they are unique, but I know people have had problems with systems like this. The problem with 1 and 2 is that accounts have not been opened up to customers yet - only administrators can log in at the moment. It should be easy to alter this (no more than a morning or afternoons work) but I would also have to implement usergroups too. The problem with option 3 is that if user A saves a favourites list called "My Favourites", and then user B tries to save a list under this name and it is refused, user B will then be able to access the list saved by user A because they now know it already exists. A solution to this is to password protect lists, but to go to all this effort I may as well implement option 2. Of course I could always use option 4; use an alternative if anyone can suggest a better solution than any of the above options. So has anyone ever done something like this before? If so how did you go about it? What do you recommend (or not recommend)? Many thanks in advance, Regards, Richard

    Read the article

  • Modifying jQuery ajax request Connectino header

    - by Pat
    I'm trying to modify the Connection header with the following code with no success jQuery.ajax ( { url: URL, async: boolVariable, beforeSend: function(xhr) { xhr.setRequestHeader("Connection", "close"); } } ) The request headers via Firebug show: Connection keep-alive X-Requested-With XMLHttpRequest Any odd bugs/problems with setting this particular header known? Or is there something I'm doing wrong?

    Read the article

  • Question about an AJAX link and the dev and prod enviroments

    - by user248959
    Hi, i have this line below that shows a link to go the next page of a list. <a href="#" onclick="new Ajax.Updater('lista_miembros', '/frontend_dev.php/miembros/filtrar?page=2')">Next page</a> The problem: as expected, it only works in the development enviroment of the frontend (frontend_dev.php). My question: what should i to get it work on both enviroments (production and development)? Using if's and getting the environment being used is the only way, or is there any cooler way? Javi

    Read the article

  • .Net with single .exe without .NET Framework installation

    - by user156144
    I wrote my simple desktop program in C#. I am reluctant to distribute it on the internet because i am not sure if users will go through pain of installing the .Net Framework. My target users are non-tech savvy users. I am very familiar with MFC and I probably can write this program in MFC in a month. MFC is nice because I don't have to worry about distributing other components. It will be one nice single executable. So my real question is this: Is it possible to write .Net app without worrying about distributing .Net Framework? Update I found another solution: If you are using Innosetup, there is a script that installs .net framework. http://www.codeproject.com/KB/install/dotnetfx_innosetup_instal.aspx

    Read the article

  • Jquery-ajax parse xml and set radiobutton

    - by haltman
    hi everybody, I've a form with some radio button like this: <input type="radio" name="leva" value="a"><input type="radio" name="leva" value="b"> with ajax post method I receive value of the radio. The question is how can I set correct radio value to checked? thanks in advance ciao h.

    Read the article

< Previous Page | 171 172 173 174 175 176 177 178 179 180 181 182  | Next Page >