Search Results

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

Page 160/2373 | < Previous Page | 156 157 158 159 160 161 162 163 164 165 166 167  | Next Page >

  • Issue on passing a checkbox set to an AppEngine script through jQuery Ajax/Json

    - by Jorge
    I have a set of checkboxes with multiple choice allowed. I parse the set this way: if ($("input[name='route_day']:checked").length > 0) { $("input[name='route_day']:checked").each(function(){ if(this.value != null) route_days_hook.push(this.value); }); dataTrap.route_days = $.JSON.encode(route_days_hook); } ...and pull the whole dataTrap to an AppEngine Python script via jQuery ajax. However, the Python script just bugs. If i change dataTrap.route_days value to a string instead of the JSON encoded object, everything works fine. My question is: how can i pass a checkbox set to the script using Ajax and still be able to iterate over it on the script?

    Read the article

  • jQuery AJAX get request - cannot see returned data

    - by Wes
    I think I am missing something obvious here, but I can't figure it out. I expect the following HTML to alert a response from the server. But, the alert is empty. I can see in Wireshark that the expected response is coming back to me from the server. Why is it not populated in the data variable? <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> </head> <body> <script type="text/javascript"> $.get("http://www.geocommunicator.gov/TownshipGeocoder/TownshipGeocoder.asmx/GetTRS", {'Lat': 41, 'Lon': -93, 'Units': 'eDD', 'Datum': ''}, function(data) { alert('data:'+data); }); </script> </body> </html>

    Read the article

  • codeigniter csrf protection with ajax

    - by Yarandi
    i have a small problem here which i cannot fix,This post goes through but the response returns a “500 internal server error” who to fix it? JS in view: function load(value) { var utype = value; if(utype>0) { new Ajax.Request('<?php echo base_url().'another/load';?>'+'/'+utype, { method:'post', onSuccess: function(transport){ var response = transport.responseText || "no response text"; if(response!="no response text") document.getElementById('prog_id').innerHTML = response; }, onFailure: function(){ alert('Something went wrong ...') } }); } error in firebug : An Error Was Encountered The action you have requested is not allowed. when i change CSRF protection to False in config file its work for me.but i want protect this request with CSRF enabled. after search in CI forum i found this this link codeigniter-csrf-protection-with-ajax but i cant solve by it.can any one help me?

    Read the article

  • Problem using AJAX with a Java Applet

    - by diglettpotato
    I currently have a Java Applet which contains a method callfromjs(). Javascript calls this method from the applet so that I don't have to deal with the clunky applet GUI, and then I can create the responses on the DOM easily from javascript. The problem is that the browser hangs while first loading the applet. To get around this, I figured I could use AJAX. The AJAX calls a PHP file which contains callfromjs(). The problem is that the request returns because it's PHP, and it doesn't wait for callfromjs() to retrieve the content. On to my questions: Is there a better way to handle this? If this method seems ok, how can I force the request not to return until the javascript is finished calling the method from the applet?

    Read the article

  • asp.net ajax collapsible panel in ie8 problem

    - by stuart
    Anyone try this simple bit of code in an ie8 browswer and try refreshing the page, in ie8 you will get an error around getelementbyid on refresh. When i run it it complains of not being able to find control with id of 'ctl00_main_dd' <cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender2" runat="server" ImageControlID="Image2" CollapsedImage="~/App_Themes/IMStandard/icons/uparrow.png" ExpandedImage="~/App_Themes/IMStandard/icons/downarrow.png" CollapseControlID="dd" ExpandControlID="dd" TargetControlID="pnlQuickKeywordSearch" SuppressPostBack="true"> </cc1:CollapsiblePanelExtender> <asp:Panel ID="dd" runat="server"> <h3 class="loginHeader"> <asp:Image ID="Image2" runat="server" /> &nbsp;&nbsp;Quick Keyword search&nbsp;<asp:Image ID="HelpIconImage" runat="server" Width="16px" Height="16px" ImageUrl="~/App_Themes/IMStandard/icons/help.png" /></h3> </asp:Panel> <asp:Panel ID="pnlQuickKeywordSearch" Style="float: left; border: double 3px #C9DF86;" runat="server" > <div style="clear: both; padding: 5px;"> </div></asp:Panel> Anybody know why this is happening? is it a bug in ie8 or am i missing something? By the way, i am using masterpages, but i dont think that has anything to do with it. Thanks

    Read the article

  • Best Technologies for AJAX Web Development

    - by floatingfrisbee
    Hey Everyone, I have some experience in AJAX development, mostly on .NET and MooTools. However, I want to learn more and see what others out there thought about the various other options available. I am looking more for advise about the front end. The back end, I will most probably be coding up in .NET using c# and WCF services. Please feel free to provide me as much information as you can. Also I would appreciate any links to resources. List of Options (feel free to add) Write my own Javascript Use a frame work like MooTools, JQuery etc. Which one is better? Use Google Web Toolkit. Am I tying myself to limitations of GWT? Or are there not limitations? ASP.NET AJAX WPF (Will this run on non IE browsers?) Flash (it'll be a pain to learn action script) Thanks Jaspreet

    Read the article

  • window.onbeforeunload ajax request problem with Chrome

    - by lang2
    Hello, I have a web page that handles remote control of a machine through Ajax. When user navigate away from the page, I'd like to automatically disconnect from the machine. So here is the code: window.onbeforeunload = function () { bas_disconnect_only(); } The disconnection function simply send a HTTP GET request to a PHP server side script, which does the actual work of disconnecting: function bas_disconnect_only() { var xhr = bas_send_request("req=10", function() { } ); } This works fine in FireFox. But with Chrome, the ajax request is not sent at all. There is a unacceptable workaround: adding alert to the callback function: function bas_disconnect_only() { var xhr = bas_send_request("req=10", function() { alert("You're been automatically disconnected."); } ); } After adding the alert call, the request would be sent successfully. But as you can see, it's not really a work around at all. Could somebody tell me if this is achievable with Chrome? What I'm doing looks completely legit to me. Thanks,

    Read the article

  • Problems migrating databinding in VB.NET from Winforms to ASP.NET 2.0

    - by David
    And this was supposed to be so easy... I have existing business and data access layers that handle the retrieval and update of the data in question. These work great with the existing Winforms application (.Net V2.0) Now, in trying to write a new web-based UI, I'm running into all sorts of problems (last time I wrote asp.net code was in 1.1). Specifically, I can't data bind a text box to a business object. Oh, sure there's the ObjectDataSource but that wants to know how to do CRUD operations on the data. What I'm looking for is something that acts like the 'classic' binding objects so that, in my code, it's as simple as retrieving the object and doing a a refresh. The data component like FormView and DetailsView are so generic-looking that it's ridiculous. The existing application would have tabbed dialogs, text boxes grouped by panels, etc. On top of that, I have a directive to use master pages and unless one control causes it, I can't seem to get the content section to expand. I can't just put a text box 'below' the bottom of "Content1" and have it resize the content section - which gives me the same results as an earlier question I posted when the footer wasn't being 'pushed down' - relative position solved that but doesn't seem to solve it with placing small text boxes in the area. What I want is fairly simple. Something like: bindingobject.datasource = businessdataobject bindingobject.refresh ...and have the text boxes refresh with the new values. Likewise to have 'businessdataobject' properties updated as the user enters new data. I was able to do this with the GridView (grdRequests.DataSource = lstRequests) by making a list of asp:BoundField tags inside the collection of the GridView. Am I tilting at windmills here?

    Read the article

  • Send asapMail without reloading page using ajax

    - by Darren Cook
    Hi, I have a form that posts data to an aspMail file for delivery (works fine in current format), but would like to have the form data sent without having to re-direct to another page. Looks like Ajax is the way to proceed but I'm having a problem getting the setup to work. Here's how I've changed the html: Added: $('#myForm').submit(function() { $.ajax({ data: $(this).serialize(), type: $(this).attr('post'), url: $(this).attr('aspSend.asp'), success: function(response) { $('#created').html(response) } }); }); Changed the form tag from: <form name="myForm" action"aspSend.asp"> to: <form name="myForm"> but now the emails don't arrive!! Any suggestions?

    Read the article

  • jquery - lose click() event after ajax call???

    - by niczoom
    At the following webpage liamharding.com/pgi.php I have an option panel on the left side of the page which opens and closes upon clicking the panels 'arrow', this works fine until you select a market (for testing use one of the 'Random Walk' markets and click 'Show/Refesh Graphs'), this then makes an ajax call using get_graph(forexName, myCount, divIsNew) function. Once this call is completed a graph(s) is displayed and then my options panels click() event does not work? The ajax call returns the data in a variable ajax_data, the problem happens when I perform the following code var jq_ajax_data = $("<div/>").html(ajax_data); . I need to wrap it in a so I can extract data from it using jQuery. If this line of code is commented out the click() event works fine ?? Hope somebody can help, I have spent a lot of time but cant find what the problem is.

    Read the article

  • Change the output of the Html.menu() asp control .

    - by user327893
    Im creating a asp mvc application and im using a sitemap to create my menu. Is it possible to change the output of the Html.menu() asp control? normal output: <ul> <li><a href="#">Item 1</li> <li><a href="#">Item 2</li> </ul> needed output: <ul> <li><a href="#"><span>Item 1</span></li> <li><a href="#"><span>Item 2</span></li> </ul> Or should i filter true the nodes of the sitemap to get the format i want?? TY in advance:)

    Read the article

  • Ajax basic email code without reloading page

    - by Camran
    I have in a previous Q found out that I need an ajax-function to send an email (submit a contact form) without reloading the page. This is for my classifieds website, where when users are viewing a classified they have the option to "tip a friend" by entering their friends email-adress and submitting the form. But I don't want to reload the page, that would be frustrating and not so clever. The only input in the form is a text input which will contain the email-adress to send to, and another hidden input which contains the classified_id nr, to identify which classified it is. The website is php based btw... Does anybody have a simple script for this? I have no experience in Ajax at all... And would really appreciate it. Thanks PS: Would prefer no Jquery, due to clients own reasons...

    Read the article

  • Using jQuery ajax response data

    - by Theopile
    Hi again, I am using ajax post and am receiving data in the form of html. I need to split up the data and place pieces of the data all over the page. I built my response data to be something like <p id='greeting'> Hello there and Welcome </p> <p id='something'>First timer visiting our site eh'</p> It is a little more complicated and dynamic but I can figure it out if get this question answered. Thanks $.ajax({ type:'POST', url: 'confirm.php', data: "really=yes&sure=yes", success:function(data){ //Need to split data here } });

    Read the article

  • problem with prototype.js Ajax functions

    - by Maksim Burnin
    my code(prototype 1.6.1) Event.observe(window, 'load', function() { new Ajax.Request('/modal/order_same/', { parameters: {}, onComplete: function(){alert('err0');}, onSuccess:function(){alert('err1');}, onCreate:function(){alert('err2');}, onFailure:function(){alert('err3');}, onException:function(){alert('err4');}, onLoaded:function(){alert('err5');} }); }); or Event.observe(window, 'load', function() { new Ajax.Updater(somelement,'/modal/order_same/', { parameters: {}, onComplete: function(){alert('err0');}, onSuccess:function(){alert('err1');}, onCreate:function(){alert('err2');}, onFailure:function(){alert('err3');}, onException:function(){alert('err4');}, onLoaded:function(){alert('err5');} }); }); all i get in ff3.7prea5 is "err2". my client says he has ff3.6.3 and same error firebug console says he's get the response and the status code is 200 works fine in opera, ie 6-8, ff on some computers any suggestions?

    Read the article

  • Does Google crawl AJAX content?

    - by Doug
    On the home page of my site I use JQuery's ajax function to pull down a list of recent activity of users. The recent activity is displayed on the page, and each line of the recent activity includes a link to the user profile of the user who did the activity. Will Google actually make the ajax call to pull down this info and use it in calculating page relevancy / link juice flow? I'm hoping that it does not because the user profile pages are not very Google index worthy, and I don't want all those links to the User profile pages diluting my home page's link juice flow away from other more important links.

    Read the article

  • jQuery ajax works on local but not on server

    - by anjan
    Hi All! I m actually put of my min with this code .... $.ajax({ 'url' : site_root + '/ajax.php', 'type' : 'POST', 'data' : 'function=check_user_login_name&user_login=' + user_login, beforeSend : function() { $('#check_result_span').html('Checking ...'); }, success : function(data) { if(data != 1) { $('#check_result_span').addClass('green').html('Available!'); } else { $('#check_result_span').addClass('red').html('Already taken!'); } } }); This works fine on local machine, but not on server ... the server page link is http://onlyfreelancer.com/signup.php Please click on the "Check availability" link, nothing happens on server but on local it shows if the user login name is still available or not Any help plz?

    Read the article

  • Confirmation box pops up more than once using ajax

    - by peter burg
    I'm using Ajax to delete records and display an animated message (function display_message) when this record is deleted, but I noticed that the confirmation box pops up depending on the number of records. for example if I have 2 records in my list and I want to delete on of them.The confirmation box pops up twice before deleting and the same thing happen with the message, It appears twice(I'm using a message that fade in and out), and so on(3 records - 3 pops up, etc). I tried a lot to resolve it but I haven't succeed . Here is my function that delete the records: $(function() { $(".delete_class").click(function() { var id = $(this).attr("id"); var dataString = 'id='+ id ; var parent = $(this).parent().parent(); if(confirm("are you sure?")) { $.ajax({ type: "POST", url: "delete.php", data: dataString, cache: false, success: function() { parent.hide(); } }); } display_message("user deleted!") }); }); Please help.

    Read the article

  • Object's field cannot be accessed after $.ajax call in success function - it is undefined

    - by dragonfly
    I have a $.ajax call and and server returns JSON. This is my call: var result; // tmp variable just for playing with Chrome console $.ajax({ type: "GET", url: "ashxJSON.ashx", data: { name: "some sample data" }, contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { result = msg; console.log(msg); $("#output").append("<p>" + msg.message + "</p>"); }, error: function (jqXHR, textStatus, errorThrown) { console.log(textStatus); console.log(errorThrown); } }); Server returns exactly this string: { "messsage": "Hello World to ..."} And now, when I: console.log(msg) I see: Object messsage: "Hello World to..." proto: Object But when I access msg.message or msg["message"] I see: undefined What is wrong with me / that msg object?

    Read the article

  • PHP: Ajax ignores line foldings in the text

    - by ilnur777
    I don't understand why my AJAX script ignores all line foldings. I first type text to the textarea and then put onclick to send button. Here is my AJAX realization: // creating ajax object // ==================== function createRequestObject(){ try { return new XMLHttpRequest() } catch(e) { try { return new ActiveXObject('Msxml2.XMLHTTP') } catch(e) { try { return new ActiveXObject('Microsoft.XMLHTTP') } catch(e) { return null; } } } } // message options (save, cancel) // ============================== function form1(text){ var http = createRequestObject(); if(http){ http.open("GET", "my_script.php?text=" + text); http.onreadystatechange = function (){ if(http.readyState == 4){ alert("Ok!"); } } http.send(null); } else { document.location = "my_script.php?text=" + text; } } html form <p align="justify" style="margin-right:10; margin-left:10;"> <table style="margin-right:10; margin-left:10;" align="center" border="0" cellpadding="0" cellspacing="0" width="680"> <TBODY> <form name="fgform"> <tr> <td width="680" height="100" colspan="2"><p><textarea id="edit_text1" name="edit_text" rows="3" style="width: 680; height: 100;"></textarea></p></td> </tr> <tr> <td width="340"><p><input type="button" id="saveB" value="Save Text" style="color:rgb(0,204,0); background-color:white; border-width:1; border-color:rgb(225,218,202); border-style:solid; width:100;" onclick="form1(document.getElementById('edit_text1').value);"></p></td> <td width="340"><p align="right">&nbsp;</p></td> </tr> </form> </TBODY> </table>

    Read the article

  • jQuery Ajax Methods Not Returning XHR Object

    - by Nate
    UPDATE: I haven't figured out what's going on, but this definitely seems to be a problem with my project. After creating a simple test page, I was able to verify that getJSON does in fact return an XHR object like it's supposed to. Per the stackoverflow question/answer here: Kill ajax requests using javascript using jquery. and a number of other question/answers on this site and others, the jQuery Ajax methods should return the XHR object. However, when I run the following code, request is "undefined". var request = $.getJSON(url, function(data) { console.log(data); }); console.log(request); Did I miss a change in jQuery? I'm using 1.4.4.

    Read the article

  • Why is my substitution control suddenly not working in ASP.NET 4.0?

    - by Steve Wortham
    I just upgraded my site from ASP.NET 3.5 to 4.0. I've been working through some breaking changes (there were more than I expected). One I can't figure out, however, is why my <asp:Substitution /> control suddenly stopped working like it should. It's supposed to ignore the output cache settings of the parent page and update upon every request. For some reason that isn't happening. It's caching for the full 10 minutes (the OutputCache setting for my home page). Any ideas?

    Read the article

  • A standard event messaging system with AJAX?

    - by Gutzofter
    Is there any standards or messaging framework for AJAX? Right now I have a single page that loads content using Ajax. Because I had a complex form for data entry as part of my content, I need to validate certain events that can occur in my form. So after some adjustments driven by my tests: asyncShould("search customer list click", 3, function() { stop(1000); $('#content').show(); var forCustomerList = newCustomerListRequest(); var forShipAndCharge = newShipAndChargeRequest(forCustomerList); forCustomerList.page = '../../vt/' + forCustomerList.page; forShipAndCharge.page = 'helpers/helper.php'; forShipAndCharge.data = { 'action': 'shipAndCharge', 'DB': '11001' }; var originalComplete = forShipAndCharge.complete; forShipAndCharge.complete = function(xhr, status) { originalComplete(xhr, status); ok($('#customer_edit').is(":visible"), 'Shows customer editor'); $('#search').click(); ok($('#customer_list').is(":visible"), 'Shows customer list'); ok($('#customer_edit').is(":hidden"), 'Does not show customer editor'); start(); }; testController.getContent(forShipAndCharge); }); Here is the controller for getting content: getContent: function (request) { $.ajax({ type: 'GET', url: request.page, dataType: 'json', data: request.data, async: request.async, success: request.success, complete: request.complete }); }, And here is the request event: function newShipAndChargeRequest(serverRequest) { var that = { serverRequest: serverRequest, page: 'nodes/orders/sc.php', data: 'customer_id=-1', complete: errorHandler, success: function(msg) { shipAndChargeHandler(msg); initWhenCustomer(that.serverRequest); }, async: true }; return that; } And here is a success handler: function shipAndChargeHandler(msg) { $('.contentContainer').html(msg.html); if (msg.status == 'flash') { flash(msg.flash); } } And on my server side I end up with a JSON structure that looks like this: $message['status'] = 'success'; $message['data'] = array(); $message['flash'] = ''; $message['html'] = ''; echo json_encode($message); So now loading content consists of two parts: HTML, this is the presentation of the form. DATA, this is any data that needs be loaded for the form FLASH, any validation or server errors STATUS tells client what happened on server. My question is: Is this a valid way to handle event messaging on the client-side or am I going down a path of heartache and pain?

    Read the article

  • ASP.NET MVC 4/Web API Single Page App for Mobile Devices ... Needs Authentication

    - by lmttag
    We have developed an ASP.NET MVC 4/Web API single page, mobile website (also using jQuery Mobile) that is intended to be accessed only from mobile devices (e.g., iPads, iPhones, Android tables and phones, etc.), not desktop browsers. This mobile website will be hosted internally, like an intranet site. However, since we’re accessing it from mobile devices, we can’t use Windows authentication. We still need to know which user (and their role) is logging in to the mobile website app. We tried simply using ASP.NET’s forms authentication and membership provider, but couldn’t get it working exactly the way we wanted. What we need is for the user to be prompted for a user name and password only on the first time they access the site on their mobile device. After they enter a correct user name and password and have been authenticated once, each subsequent time they access the site they should just go right in. They shouldn’t have to re-enter their credentials (i.e., something needs to be saved locally to each device to identify the user after the first time). This is where we had troubles. Everything worked as expected the first time. That is, the user was prompted to enter a user name and password, and, after doing that, was authenticated and allowed into the site. The problem is every time after the browser was closed on the mobile device, the device and user were not know and the user had to re-enter user name and password. We tried lots of things too. We tried setting persistent cookies in JavaScript. No good. The cookies weren’t there to be read the second time. We tried manually setting persistent cookies from ASP.NET. No good. We, of course, used FormsAuthentication.SetAuthCookie(model.UserName, true); as part of the form authentication framework. No good. We tried using HTML5 local storage. No good. No matter what we tried, if the user was on a mobile device, they would have to log in every single time. (Note: we’ve tried on an iPad and iPhone running both iOS 5.1 and 6.0, with Safari configure to allow cookies, and we’ve tried on Android 2.3.4.) Is there some trick to getting a scenario like this working? Or, do we have to write some sort of custom authentication mechanism? If so, how? And, what? Or, should we use something like claims-based authentication and WIF? Or??? Any help is appreciated. Thanks!

    Read the article

< Previous Page | 156 157 158 159 160 161 162 163 164 165 166 167  | Next Page >