Search Results

Search found 6590 results on 264 pages for 'success'.

Page 8/264 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Sounds for build error/success in Visual C++?

    - by jwfearn
    On long Visual C++ builds, it would be really helpful to hear some sort of (optional) sounds for such build/compile results as: individual compile error file compile success/failure build success/failure batch build success/failure Does anyone know how to enable sounds for these kinds of build occurrences in Visual C++ (especially Visual C++ 2008 on Vista)?

    Read the article

  • ajax call success function never called

    - by Shai
    The following code is a very simple ajax call to server that alerts back on success and complete events. From a reason I cannot understand on my development machine it works fins and alerts on success and complete but on server it never alerts on success. WHY ??? ** <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"></script> <script type="text/javascript"> function dummy() { $.ajax({ url: 'services/chatEngine.asmx/dummy', async: true, type: "POST", complete: function () { alert('Done'); }, success: function (a, b, c) { alert('Success'); } }); } </script> </head> <body> <form id="form1" runat="server"> <div> <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </ajaxToolkit:ToolkitScriptManager> <div id="userList">Users:<br /></div> <input id="Button3" type="button" value="dummy" onclick="dummy()" /> </div> </form> </body> </html> ** The server side dummy function returns nothing, code follows - Public Function dummy() As String Return "" End Function

    Read the article

  • jquery ajax form success callback not being called

    - by Michael Merchant
    I'm trying to upload a file using "AJAX", process data in the file and then return some of that data to the UI so I can dynamically update the screen. I'm using the JQuery Ajax Form Plugin, jquery.form.js found at http://jquery.malsup.com/form/ for the javascript and using Django on the back end. The form is being submitted and the processing on the back end is going through without a problem, but when a response is received from the server, my Firefox browser prompts me to download/open a file of type "application/json". The file has the json content that I've been trying to send to the browser. I don't believe this is an issue with how I'm sending the json as I have a modularized json_wrapper() function that I'm using in multiple places in this same application. Here is what my form looks after Django templates are applied: <form method="POST" enctype="multipart/form-data" action="/test_suites/active/upload_results/805/"> <p> <label for="id_resultfile">Upload File:</label> <input type="file" id="id_resultfile" name="resultfile"> </p> </form> You won't see any submit buttons because I'm calling submit with a button else where and am using ajaxSubmit() from the jquery.form.js plugin. Here is the controlling javascript code: function upload_results($dialog_box){ $form = $dialog_box.find("form"); var options = { type: "POST", success: function(data){ alert("Hello!!"); }, dataType: "json", error: function(){ console.log("errors"); }, beforeSubmit: function(formData, jqForm, options){ console.log(formData, jqForm, options); }, } $form.submit(function(){ $(this).ajaxSubmit(options); return false; }); $form.ajaxSubmit(options); } As you can see, I've gotten desperate to see the success callback function work and simply have an alert message created on success. However, we never reach that call. Also, the error function is not called and the beforeSubmit function is executed. The file that I get back has the following contents: {"count": 18, "failed": 0, "completed": 18, "success": true, "trasaction_id": "SQEID0.231"} I use 'success' here to denote whether or not the server was able to run the post command adequately. If it failed the result would look something like: {"success": false, "message":"<error_message>"} Your time and help is greatly appreciated. I've spent a few days on this now and would love to move on.

    Read the article

  • jQuery Ajax call - Set variable value on success.

    - by Nathan
    Hey all, I have an application that I am writing that modifies data on a cached object in the server. The modifications are performed through an ajax call that basically updates properties of that object. When the user is done working, I have a basic 'Save Changes' button that allows them to Save the data and flush the cached object. In order to protect the user, I want to warn them if the try to navigate away from the page when modifications have been made to the server object if they have not saved. So, I created a web service method called IsInitialized that will return true or false based on whether or not changes have been saved. If they have not been saved, I want to prompt the user and give them a chance to cancel their navigation request. Here's my problem - although I have the calls working correctly, I can't seem to get the ajax success call to set the variable value on its callback function. Here's the code I have now. ////Catches the users to keep them from navigation off the page w/o saved changes... window.onbeforeunload = CheckSaveStatus; var IsInitialized; function CheckSaveStatus() { var temp = $.ajax({ type: "POST", url: "URL.asmx/CheckIfInstanceIsInitilized", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(result) { IsInitialized = result.d; }, error: function(xmlHttpRequest, status, err) { alert(xmlHttpRequest.statusText + " " + xmlHttpRequest.status + " : " + xmlHttpRequest.responseText); } }); if (IsInitialized) { return "You currently have unprocessed changes for this Simulation."; } } I feel that I might be trying to use the Success callback in an inappropriate manner. How do I set a javascript variable on the Success callback so that I can decide whether or not the user should be prompted w/ the unsaved changes message? As was just pointed out, I am making an asynchronous call, which means the rest of the code gets called before my method returns. Is there a way to use that ajax call, but still catch the window.onunload event? (without making synchronos ajax)

    Read the article

  • jQuery $.ajax calls success handler when reuqest fails because of browser reloading

    - by Martin
    I have the following code: $.ajax({ type: "POST", url: url, data: sendable, dataType: "json", success: function(data) { if(customprocessfunc) customprocessfunc(data); }, error: function(XMLHttpRequest, textStatus, errorThrown){ // error handler here } }); I have a timer which makes AJAX requests often. If I do not receive anything in 'data', I show an error message to the user - it means, something wnet bad on the server. The problem is when user reloads the page while the AJAX call is in progress. I can see in the firebug that the AJAX call fails (URL is colored red and no HTTP status is displayed) so I expect that jQuery will stop the reuqest or at least go to the error handler. But it goes to the success handler and passes null in the 'data' variable. As a result, when user reloads the page, sometimes he can see my big red message about unknown error (because data is null). Is there any way to make jQuery abort the request on complete reloading all at least not to call my success function? I have no way to know in the success handler why the data is null - did it came empty from the server or the call was aborted because of reload.

    Read the article

  • Jquery post success variable scope

    - by minirobot
    Hi, I'm trying to return the ajax success array from one function to another. For some reason I don't seem to be able to pass the data stored in a variable in the success part of the ajax function into the parent function to return. Thanks so much for any assistance. Here's a simplified version of the code: // make json_to_return global var json_to_return; function loop_through_data(){ // call the load_days function and put its array data into days_array var days_data = load_days(03,2010); // I'd like to be able to iterate through days_data here // // } function load_days(selectedMonth, selectedYear){ $.ajax({ type: "POST", dataType: "json", url: "../includes/get_availability.php", data: "month=" + selectedMonth + "&year=" + selectedYear, success: function(available_json){ json_to_return = available_json; }, error: function(msg){ alert("error " + msg); } }); return json_to_return; }

    Read the article

  • success, error events aren't working for ajax

    - by Rigo Vides
    Hi everyone, I have the following code: $(document).ready(function(){ $.ajax({ url: "svc/GetTweetsByUser.php", type: "POST", success: function(data) { alert('success'); }, failure: function(){ alert('fail'); }, data: ({twitter_user : 'AdoboHobo'}), dataType: "xml" } );//endof ajax }); I'm kind of starting with web and ajax stuff... this worked perfectly by yesterday. I don't know what is happening now that neither success nor failure events are triggering. I'm shure that the request and response are perfectly working, I checked that with firebug. Does anyone have any ideas for this? Thanks in advance.

    Read the article

  • Success function not being called when form is submitted

    - by Tom Hartman
    Hi, I've been trying to figure out why the following script's success function isn't running. Everything in my form works perfectly, and the form contents are being emailed correctly, but the success function isn't being called. If anyone could review my code and let me know why my success function isn't being called I would very much appreciate it! Here is the HTML form with notification divs, which are hidden via css: <div id="success" class="notification"> <p>Thank you! Your message has been sent.</p> </div> <div id="failure" class="notification"> <p>Sorry, your message could not be sent.</p> </div> <form id="contact-form" method="post" action="" class="jqtransform"> <label for="name">Name:</label> <input name="name" id="name" type="text" class="validate[required] input" /> <label for="company">Company:</label> <input name="company" id="company" type="text" class="input" /> <label for="phone">Phone:</label> <input name="phone" id="phone" type="text" class="input" /> <label for="email">Email:</label> <input name="email" id="email" type="text" class="validate[required,email] input" /> <div class="sep"></div> <label for="subject">Subject:</label> <input name="subject" id="subject" type="text" class="validate[required] input" /> <div class="clear"></div> <label for="message">Message:</label> <textarea name="message" id="message" class="validate[required]"></textarea> <div id="check-services"> <input type="checkbox" name="services[]" value="Contractor Recommendation" /> <div>Contractor Recommendation</div> <input type="checkbox" name="services[]" value="Proposal Review" /> <div>Proposal Review</div> <input type="checkbox" name="services[]" value="Existing Website Review" /> <div>Existing Website Review</div> <input type="checkbox" name="services[]" value="Work Evaluation" /> <div>Work Evaluation</div> <input type="checkbox" name="services[]" value="Layman Translation" /> <div>Layman Translation</div> <input type="checkbox" name="services[]" value="Project Management" /> <div>Project Management</div> </div> <div class="sep"></div> <input name="submit" id="submit" type="submit" class="button" value="Send" /> <input name="reset" id="reset" type="reset" class="button" value="Clear" onclick="$.validationEngine.closePrompt('.formError',true)" /> </form> Here is the javascript: // CONTACT FORM VALIDATION AND SUBMISSION $(document).ready(function(){ $('#contact-form').validationEngine({ ajaxSubmit: true, ajaxSubmitFile: 'lib/mail.php', scroll: false, success: function(){ $('#success').slideDown(); }, failure: function(){ $('#failure').slideDown(); $('.formError').animate({ marginTop: '+30px' }); } }); }); And here is my PHP mailer script: <?php $name = $_POST['name']; $company = $_POST['company']; $phone = $_POST['phone']; $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; $services = $_POST['services']; $to = '[email protected]'; $subject = 'THC - Contact'; $content .= "You received a message from ".$name.".\r\n\n"; if ($company): $content .= "They work for ".$company.".\r\n\n"; endif; $content .= "Here's the message:\r\n\n".$message."\r\n\n"; $content .= "And they are interested in the services below:\r\n\n"; $content .= implode("\r\n",$services); if ($phone): $content .= "\r\n\nYou can reach them at ".$phone."."; else: $content .= "\r\n\nNo phone number was provided."; endif; $headers = "From: ".$name."\r\n"; $headers .= "Reply-To: ".$email."\r\n"; if (mail($to,$subject,$content,$headers)): return true; else: return false; endif; ?>

    Read the article

  • SQL Maintenance Cleanup Task 'Success' But not deleting files

    - by Seph
    I have a maintenance plan setup for a databases on a server. As part of the backup is a Maintenance Cleanup Task. SQL Version 2008 The task that 'succeeds' is setup as: Delete backup files Correct folder (same address as the backup task) File extension: bak (NOT .bak) Delete files older than: 20 Hour(s) I have other similar cleanup tasks that occur in the same maintenance plan which work fine. This plan has worked fine in the past, I just noticed that last night it reported 'success' and the rest of the plan continued, however the file from 2 days ago still remains. I have checked similar questions such as this question, and this is not the case as my maintenance task worked fine two days ago and for the past several weeks:

    Read the article

  • firefox, jQuery ajax calls firing twice and never triggering success or error functions

    - by Adrian Adkison
    Hi, I am developing with the .NET framework, using jQuery 1.4.2 client side. When developing in Firefox version 3.6, every so often an one of the many ajax calls I make on the page will fire twice, the second will return successfully but will not trigger the success handler of the ajax call and the first never returns anything. So basically the data is all sent to the server and response is sent down but nothing happens with the response. Here is an example of the call I am making. It happens to any of the ajax calls, so there is not one particular that is causing the problem: $.ajax({ type:"POST", contentType : "application/json; charset=utf-8", data:"{}", dataType:"json", success:function(){ alert('success'); }, error:function(){ alert('error'); }, url:'/services.aspx/somemethod' }); }) From firebug, here are the headers of the first call which in firebug shows as never completely responding, meaning i see no response code and the loader gif in the firebug never goes away. Note:In firebug it usually says Response Header but for the first call this space is blank Server ASP.NET Development Server/9.0.0.0 X-AspNet-Version 2.0.50727 Content-Type application/json; charset=utf-8 Connection Close Request Headers Host mydomain.com User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401Firefox/3.6.3 ( .NET CLR 3.5.30729) Accept application/json, text/javascript, */* Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Content-Type application/json; charset=utf-8 X-Requested-With XMLHttpRequest Referer http://mydomain.com/mypage.aspx Here is the header from the second request which just appear to complete in firebug (i.e response is 200): Response Header Server ASP.NET Development Server/9.0.0.0 X-AspNet-Version 2.0.50727 Content-Type application/json; charset=utf-8 Connection Close Request Headers Host mydomain.com User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729) Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Content-Type application/json; charset=utf-8 Referer http://mydomain.com/mypage.aspx To summarize my question, why are two requests being made and why are neither of them triggering a success or error handler in the ajax call. I have seen this article about firefox 3.5+ and preflighted requests https://developer.mozilla.org/En/HTTP_access_control#Preflighted_requests In the article is says if a "POST" is made with any other content type than "application/x-www-form-urlencoded, multipart/form-data, or text/plain" than the request is pre-flighted. If this is the case, this should happen to all of my calls. Thanks

    Read the article

  • jQuery .ajax success function not rendering html with jQuery UI elements

    - by tylerpenney
    How do I have the html loaded into my div from the .ajax render with jquery? the success function loads the HTML, but those elements do not show up as jQuery UI elements, just the static HTML types. Any pointers? $(function() { $('input[type=image]').click(function(){ $.ajax({ url: '_includes/callinfo.php', data: 'id=' + $(this).attr('value'), dataType: "html", success: function(html){ $('#callwindow').html(html); } }); }); });

    Read the article

  • hoq do i get ajax to call after previous success is complete

    - by Alessandro
    I am currently using this ajax queuing plugin http://www.onemoretake.com/2009/10/11/ajaxqueue-and-jquery-1-3/ and it works fine, except weh ajax call 1 finishes, ajax call 2 starts that is dependent on a value that the success functions generates when ajax 1 is complete. Is there a way to start of all ajax calls when the previous call is complete and success function has been run? thanks

    Read the article

  • how do i get ajax to call after previous success is complete

    - by Alessandro
    I am currently using this ajax queuing plugin http://www.onemoretake.com/2009/10/11/ajaxqueue-and-jquery-1-3/ and it works fine, except weh ajax call 1 finishes, ajax call 2 starts that is dependent on a value that the success functions generates when ajax 1 is complete. Is there a way to start of all ajax calls when the previous call is complete and success function has been run? thanks

    Read the article

  • need explaination of jquery ajax.success paramters

    - by user1575229
    case 'ajax': busy = false; $.fancybox.showActivity(); selectedOpts.ajax.win = selectedOpts.ajax.success; ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, { url : href, data : selectedOpts.ajax.data || {}, error : function(XMLHttpRequest, textStatus, errorThrown) { if ( XMLHttpRequest.status > 0 ) { _error(); } }, success : function(data, textStatus, XMLHttpRequest) { var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader; if (o.status == 200) { if ( typeof selectedOpts.ajax.win == 'function' ) { ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest); if (ret === false) { loading.hide(); return; } else if (typeof ret == 'string' || typeof ret == 'object') { data = ret; } } tmp.html( data ); _process_inline(); } } })); break; Can anyone please explain what is going on in this code selectedOpts.ajax.win = selectedOpts.ajax.success; what is happening here?and what is the usefulness? ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest); what is happening here? what does the win() method call.

    Read the article

  • jQuery ajax success chaining Internet Explorer Issues

    - by Nickd
    I have a jQuery ajax function that retrieves JSON data. In the success block I call another function to parse the data and update the page. At the end of this parsing/updating function a different ajax call is made. This works perfectly in all browsers except Internet Explorer (7 and 8). The problem is Internet explorer thinks the script is taking too long to process because the success block from the first ajax call doesn't complete until the 2nd ajax call finishes. I get the message: "Stop running this script? A script on this page is causing your web browser to run slowly. If it continues to run, your computer might become unresponsive." My jQuery code: $("#id_select").bind("change", function(e){ $.ajax({ url: "/retrieve_data.js", data: {id:$(e.target).children(":selected").attr("value")}, type: "get", dataType:"json", success: function(data, status, form){ processData(data); }, error: function(response, status){ alert(response.responseText); } }); }) Any suggestions on how to get IE to stop timing out or to accomplish this task without rewriting all my jQuery functions would be appreciated.

    Read the article

  • using jquery $.ajax to retrieve data and push data into javascript array through the success functio

    - by teamdane
    Hello All, I have a function that I'm trying to retrieve values using $.ajax and push the returned data into an array called output. Problem is the success function will not allow me to push the results into the array. see below for code. var getValues = function(el) { var value = ($(el).val()); if(value == '' || $(el).attr('disabled')) { return []; } var string = 'value=' + value; var output = []; $.ajax({ type: "GET", url: 'shocklookup_callback.php', dataType: "string", data: string, success: function(data) { } }); //output.push({ text : value + 'test', value : value + 'test1'} ); return output; }; Any ideas of what I can put in the success function to be able to push the data into the output array? Also I need to be able to return the output array to the original function getValues. If this doesn't' make a whole lot of sense please let me know and I'll try to explain better. Thanks, Dane

    Read the article

  • Spring 3 Security Authentication Success Handler

    - by Eqbal
    I am using form-login for security and I am trying to implement an authentication success handler, but I am not sure how to go back to the resource that was initially requested before the login process. By default I think it implements a SimpleUrlAuthenticationSuccessHandler and I tried to mirror that class implementation. But it sets a setDefaultTargetUrl(defaultTargetUrl) and perhaps thats where the magic happens that it remembers the resource to go back to after the login process. Any help is greatly appreciated. Below is my spring security <form-login/> element <form-login login-page="/login.jsp" login-processing-url="/b2broe_login" authentication-success-handler-ref="passwordExpiredHandler" authentication-failure-url="/login.jsp?loginfailed=true" />

    Read the article

  • jQuery ajax() returning json object to another function on success causes error

    - by Michael Mao
    Hi all: I got stuck in this problem for an hour. I am thinking this is something relates to variable scoping ? Anyway, here is the code : function loadRoutes(from_city) { $.ajax( { url: './ajax/loadRoutes.php', async : true, cache : false, timeout : 10000, type : "POST", dataType: 'json', data : { "from_city" : from_city }, error : function(data) { console.log('error occured when trying to load routes'); }, success : function(data) { console.log('routes loaded successfully.'); $('#upperright').html(""); //reset upperright box to display nothing. return data; //this line ruins all //this section works just fine. $.each(data.feedback, function(i, route) { console.log("route no. :" + i + " to_city : " + route.to_city + " price :" + route.price); doSomethingHere(i); }); } }); } The for each section works just fine inside the success callback region. I can see Firebug console outputs the route ids with no problem at all. For decoupling purpose, I reckon it would be better to just return the data object, which in JSON format, to a variable in the caller function, like this: //ajax load function function findFromCity(continent, x, y) { console.log("clicked on " + continent + ' ' + x + ',' + y); $.ajax( { url: './ajax/findFromCity.php', async : true, cache : false, timeout : 10000, type : "POST", dataType : 'json', data : { "continent" : continent, "x" : x, "y" : y }, error : function(data) { console.log('error occured when trying to find the from city'); }, success : function(data) { var cityname = data.from_city; //only query database if cityname was found if(cityname != 'undefined' && cityname != 'nowhere') { console.log('from city found : ' + cityname); data = loadRoutes(cityname); console.log(data); } } }); } Then all of a sudden, everything stops working! Firebug console reports data object as "undefined"... hasn't that being assigned by the returning object from the method loadRoutes(cityname)? Sorry my overall knowledge on javascript is quite limited, so now I am just like a "copycat" to work on my code in an amateur way.

    Read the article

  • jQuery.ajax success callback function not executed

    - by Frank Michael Kraft
    I have a JavaScript Ajax call (jQuery.ajax), that does not execute the success callback function. $.ajax({ url: target, contentType: 'application/json; charset=utf-8', type: 'POST', // type: 'GET', dataType: 'jsonp', error: function (xhr, status) { alert(status); }, success: function (result) { alert("Callback done!"); // grid.dataBind(result.results); // grid.dataBind(result); } }); I see in firebug, that the request is posted and the correct result in terms of the json is returned as expected. What is wrong?

    Read the article

  • Jquery ajax request error callback is called instead of success even after response recieved from server

    - by Muhammad Tahir Butt
    I am using jquery ajax funtion to get some content from my webservice. Response from the server is received but every time error callback is called instead of success callback. And this error is returned in xhr.error: function (){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this} Here is the screenshot of response from server: and here is the code i am using to make the request: function abcdef() { $.ajax({ url: "http://192.168.61.129:8000/get-yt-access-token/", type: "GET", contentType:"application/json", error: function(xhr, textStatus, errorThrown){ alert("its error! " + xhr.error); }, success: function(data){ alert(data); } }); }

    Read the article

  • JQuery.ajax success function returns empty

    - by viatropos
    I have a very basic AJAX function in JQuery: $.ajax({ url: "http://www.google.com", dataType: "html", success: function(data) { alert(data); } }); But the data is always an empty string, no matter what url I go to... Why is that? I am running this locally at http://localhost:3000, and am using JQuery 1.4.2. If I make a local response, however, like this: $.ajax({ url: "http://localhost:3000/test", dataType: "html", success: function(data) { alert(data); } }); ...it returns the html page at that address. What am I missing here?

    Read the article

  • JQuery Ajax Updating MySQL Database, But Not Running Success Function

    - by myrmidon16
    I am currently using the JQuery ajax function to call an exterior PHP file, in which I select and add data in a database. Once this is done, I run a success function in JavaScript. What's weird is that the database is updating successfully when ajax is called, however the success function is not running. Here is my code: <!DOCTYPE html> <head> <script type="text/javascript" src="jquery-1.6.4.js"></script> </head> <body> <div onclick="addtask();" style="width:400px; height:200px; background:#000000;"></div> <script> function addtask() { var tid = (Math.floor(Math.random() * 3)) + 1; var tsk = (Math.floor(Math.random() * 10)) + 1; if(tsk !== 1) { $.ajax({ type: "POST", url: "taskcheck.php", dataType: "json", data: {taskid:tid}, success: function(task) {alert(task.name);} }); } } </script> </body> </html> And the PHP file: session_start(); $connect = mysql_connect('x', 'x', 'x') or die('Not Connecting'); mysql_select_db('x') or die ('No Database Selected'); $task = $_REQUEST['taskid']; $uid = $_SESSION['user_id']; $q = "SELECT task_id, taskname FROM tasks WHERE task_id=" .$task. " LIMIT 1"; $gettask = mysql_fetch_assoc(mysql_query($q)); $q = "INSERT INTO user_tasks (ut_id, user_id, task_id, taskstatus, taskactive) VALUES (null, " .$uid. ", '{$gettask['task_id']}', 0, 1)"; $puttask = mysql_fetch_assoc(mysql_query($q)); $json = array( "name" => $gettask['taskname'] ); $output = json_encode($json); echo $output; Let me know if you have any questions or comments, thanks.

    Read the article

  • Pass Success variable to code

    - by João Dias
    How can I pass a variable that has been calculated in the success callback of an ajax function, to the document.ready ? I have this code function loadActions() { var countDiv; $.ajax({ type: "POST", cache: false, url:"modules/actions/actions.php", success : function (data) { $("#actions-container").html(data); $('.action-details').hide(); countDiv = $('.action-tab-odd').length + $('.action-tab-even').length ; } }); return countDiv; } $(document).ready(function(){ var count = loadActions(); }); But count is allways undefined. How can I get this to work? Thank you

    Read the article

  • IE not triggering jQuery Ajax success

    - by dayosuperstar
    Hello all, I'm working on a script to load some images async using jQuery. Here is a code snippet of the function that loads the images - try{ for(img in imgsArray){ $.ajax({ async: false, type: "get", url:imgsArray[img], success:function(imgFile){ alert("success"); //do something useful }, error:function(XMLHttpRequest,status,error){ //do nothing } });//ajax } } catch(e){ //oops } I have tested this in Firefox, Webkit (Safari,Chrome) and it works. The images are in a folder on the server and I'm using jQuery 1.3. any ideas? Much appreciated.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >