Search Results

Search found 24900 results on 996 pages for 'call me steve'.

Page 28/996 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • Returning the html from .ajax call

    - by coffeeaddict
    I'm getting undefined for some reason when I try to return the html via the callback function: function getDataFromUrl(urlWithContent) { // jQuery async request $.ajax( { url: urlWithContent, dataType: "html", success: function(data) { return $('.result').html(data); }, error: function(e) { alert('Error: ' + e); } }); } I know I'm getting data back, I see it in firebug in the response and also when I alert out the data, I see the entire page content come up in the alert box. When I call my function, I am doing the following: var divContent = getDataFromUrl(dialogDiv.attr("href")); if(divContent) dialogDiv.innerHTML = divContent; when I alert out the divContent (before the if statement) I'm getting undefined. Maybe I'm just going about this wrong on how I'm returning back the data? I also tried just return data; same thing, I get undefined after the call to this method when set to my variable.

    Read the article

  • Twitter Bootstrap Ajax call error in dialog2.js

    - by naveen kumar
    We are using Twitter Bootstrap for my application. I have situation where I have to pull the data from server and show it to popup/model div. We are using dialog2.js for it but it does work. We not want to use .load functionality as we are not using any single url call. We want it to do with “URL” by ajax call and response send back to popup/model content area. We have tried following $('#proposalInDialog2').click(function(event){ var url="abc.do" $('<div/>').dialog2({title: "Goals-Based Proposal", content: url}); }); Please help us to to find out this, thanks

    Read the article

  • Confusion in bind call in socket programming

    - by Tarun
    i was learning socket programming in unix using c/c++. I am confused with one function call bind(params..). Actually it takes the adreess structure "sockaddr_in" and we can create the structure in the following way sockaddr_in.*** = somthing.. sockaddr_in..s_addr htonl(INADDR_ANY) **Passing INADDR_ANY will alow to bind all local addresses** My question is , why do we need to use "INADDR_ANY" ? In my knowledge every machine can has only one unique IP Address. In this way there is only one address associated with the machien. Thye bind call should directly bind the socket to the single available address. Please explain what are the different scenarios and why is it so?

    Read the article

  • Resolve HTTP 304 - not modified in AJAX call made via GWT

    - by Salvin Francis
    We are using an application made in GWT with the server as tomcat. The project runs fine normally, however there are situations where the server is restarted. At such point of time, the ajax call made by the code below returns blank text with the status code as 304 RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.POST, URL.encode(serverUrl)); //-- serverUrl is the url to which this call is posted to. requestBuilder.setHeader("Content-Type", "application/x-www-form-urlencoded"); requestBuilder.setHeader("Expires","0"); requestBuilder.sendRequest( postData, new RequestCallback() { public void onError(Request request, Throwable exception) { //Do nothing } public void onResponseReceived(Request request, Response response) { //sometimes when the server is restarted, I get response.getStatusCode() = 304 and the response.getText() as blank } } ); normally we get back some data from the server inside this response text. How do we now get the data when the response itself is blank ?

    Read the article

  • How can I pass a Context object to a thread on call

    - by Pentium10
    I have this code fragment: public static class ExportDatabaseFileTask extends AsyncTask<String, Void, Boolean> { private final ProgressDialog dialog = new ProgressDialog(ctx); protected void onPreExecute(); protected Boolean doInBackground(final String... args); protected void onPostExecute(final Boolean success); } I execute this thread as new ExportDatabaseFileTask().execute(); As you see I use a ctx as Context variable in the new ProgressDialog call, how do I pass a context to the call method? to this one: new ExportDatabaseFileTask().execute();*

    Read the article

  • Can't call method in model table class using Doctrine with Zend Framework

    - by Jeremy Hicks
    I'm using Doctrine with Zend Framework. For my model, I'm using a base class, the regular class (which extends the base class), and a table class. In my table class, I've created a method which does a query for records with a specific value for one of the fields in my model. When I try and call this method from my controller, I get an error message saying, "Message: Unknown method Doctrine_Table::getCreditPurchases". Is there something else I need to do to call functions in my table class? Here is my code: class Model_CreditTable extends Doctrine_Table { /** * Returns an instance of this class. * * @return object Model_CreditTable */ public static function getInstance() { return Doctrine_Core::getTable('Model_Credit'); } public function getCreditPurchases($id) { $q = $this->createQuery('c') ->where('c.buyer_id = ?', $id); return $q->fetchArray(); } } // And then in my controller method I have... $this->view->credits = Doctrine_Core::getTable('Model_Credit')->getCreditPurchases($ns->id);

    Read the article

  • How does the dispatch action call work in the Twitter sidebar

    - by phwd
    I would like to understand how the call for replies works as follows: <a href="http://twitter.com/replies" data="{"dispatch_action":"replies"}"> <span>@phwd</span> </a> This was taken from the homepage of Twitter. The section in particular being: data="{"dispatch_action":"replies"}" I believe (think), it is using Twitter's own twitter.js script and I do not want to interfere(or copy) with their code, I rather just want to know how the call works. My current setup is using Abraham's twitteroauth PHP library, jQuery and some Ajax to refresh the portion of the page needed using the following method : Use jQuery and PHP to build an Ajax-driven Web page [IBM link - I am a new user so I can only post one link] I apologize if this question is not formatted/worded well, it is my first time. Also I tried searching DocType and StackOverFlow. The Related Questions show me Struts but I am not sure it is that.

    Read the article

  • how can we call one class's method through another class's object in php

    - by hello
    I want to know that is there any method in PHP by which i can call one class's method from another class object. let me clear here is one class class A() { public function showData(){ //here is method of class A } } // here is another class class B(){ public function getData(){ //some method in class B } } //now i create two objects $objA= new class A(); $objB=new class B(); now i want to call this $objB->showData();<--- is that possible .. by any how method( using public, inheritence,child parent etc...) please help me

    Read the article

  • C# & C++, runtime error when call C++ dll from C#

    - by 5YrsLaterDBA
    I have written a C++ wrapper DLL for C# to call. The DLL was tested and worked fine with my C++ test program. now integrated with C#, I got runtime error and crashed. Cannot use debugger to see more details. The C++ side has only one method: #ifdef DLLWRAPPERWIN32_EXPORTS #define DLLWRAPPERWIN32_API __declspec(dllexport) #else #define DLLWRAPPERWIN32_API __declspec(dllimport) #endif #include "NB_DPSM.h" extern "C" { DLLWRAPPERWIN32_API int WriteGenbenchDataWrapper(string fileNameToAnalyze, string parameterFileName, string baseNameToSaveData, string logFileName, string& message) ; } in the C# side, there is a definition, [DllImport("..\\..\\thirdParty\\cogs\\DLLWrapperWin32.dll")] public static extern int WriteGenbenchDataWrapper(string fileNameToAnalyze, string parameterFileName, string baseNameToSaveData, string logFileName, ref string message); and a call: string msg = ""; int returnVal = WriteGenbenchDataWrapper(rawDataFileName, parameterFileName, outputBaseName, logFileName, ref msg); I guess there must be something wrong with the last parameter of the function. string& in C++ should be ref string in C#?

    Read the article

  • Call an anonymous function defined in a setInterval

    - by Tominator
    Hi, I've made this code: window.setInterval(function(){ var a = doStuff(); var b = a + 5; }, 60000) The actual contents of the anonymous function is of course just for this small example as it doesn't matter. What really happens is a bunch of variables get created in the scope of the function itself, because I don't need/want to pollute the global space. But as you all know, the doStuff() function won't be called until 60 seconds in the page. I would also like to call the function right now, as soon as the page is loaded, and from then on every 60 seconds too. Is it somehow possible to call the function without copy/pasting the inside code to right after the setInterval() line? As I said, I don't want to pollute the global space with useless variables that aren't needed outside the function.

    Read the article

  • Call methods on native Javascript types without wrapping with ()

    - by Anurag
    In Javascript, we can call methods on string literals directly without enclosing it within round brackets. But not for other types such as numbers, or functions. It is a syntax error, but is there a reason as to why the Javascript lexer needs these other types to be enclosed in round brackets? For example, if we extend Number, String, and Function with an alert method and try calling this method on the literals, it's a SyntaxError for Number and Function, while it works for a String. function alertValue() { alert(this); } Number.prototype.alert = alertValue; String.prototype.alert = alertValue; Function.prototype.alert = alertValue; We can call alert directly on a string object: "someStringLiteral".alert() // alerts someStringLiteral but it's a SyntaxError on numbers, and functions. 7.alert(); function() {}.alert(); To work with these types, we have to enclose it within brackets: (7).alert(); // alerts "7" (function() {}).alert(); // alerts "function() {}"

    Read the article

  • XMLHttpRequest second call always fail

    - by Michael
    I'm developing Firefox extension and inside of javascript module have function which looks like this: var ajax = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(); ajax.open('GET', url, true); ajax.onload = function () { if (ajax.readyState == 4 && ajax.status == 200) { ... } } ajax.onerror = function (e) { ... } The second call to this function always fires onerror immediately... then after that the next call is successful. What could be wrong... is it normal?

    Read the article

  • Call a C++ constructor from an Objective C class

    - by syvex
    How can I call a C++ constructor from inside an Objective C class? class CppClass { public: CppClass(int arg1, const std::string& arg2): _arg1(arg1), _arg2(arg2) { } // ... private: int _arg1; std::string _arg2; }; @interface ObjC: NSObject { CppClass _cppClass; } @end @implementation ObjC - (id)init { self = [super init]; if ( self ) { // what is the syntax to call CppClass::CppClass(5, "hello") on _cppClass? } return self; } @end

    Read the article

  • jQuery - now: Creating an object and storing values in it to pass to an AJAX call

    - by Josh K
    I have an array: myarr = []; I'm filling it with some values: myarray['name'] = "Me!"; Now I want to transform that array into a set of Key = Value pairs. I though jQuery would do it automatically, but it doesn't seem to. $.ajax ({ type: "POST", dataType: "text", url: "myurl", data: myarr }); Is there a way to do this or something I'm doing wrong? I get no javascript errors, and no serverside errors other then no POST information at all. I need the request to be sent as a true POST request. I need to keep the php code simple because sometimes the login won't be an AJAX call. I'm now trying the following with an error unexepected token ':' myarr: { 'name':'me' } The question has now become: How do I initialize a new javascript object as "blank", how do I set up mappings, and how do I pass it in an AJAX call?

    Read the article

  • C - Call a function

    - by Pedro
    Hello. I want to get a value from a function in other function i think i have to call a function in other function, then call it on main, but how? void funcA(PEOPLE people[], int *total){ FILE *fp; char line[100]; fp=fopen("example.txt","r"); if(fp==NULL){ exit(1); } else{ fgets(line, 100, fp);//get a number from the txt total=atoi(linha);//convert to int } } void funcB(PEOPLE people[], int *total){ int i; for(i=0;i<total;i++){ printf("%s\n",people[i].name); } funcA(people,&total); } void main(){ PERSON person[100]; int *total; funcB(people,&total); } What i'm doing wrong?

    Read the article

  • Actionscript 2 call function from variable

    - by NebNeb
    How can i call a function form a variable. var upfunction = init; //or var upfunction = init(); I have tried the above code and it does not work. I want to be able to call that variable from a keypress and change the variables function. For example. function init(){ //Do whatever } function init2(){ //Do another thing } var upfunction = init(); if (Key.getCode() == Key.UP) { upfunction; } Then later doing upfunction = init2(); That way i could change the function without having much code. Sorry if this is a noob question but all i do is copy and paste code i have found.

    Read the article

  • return from jquery ajax call

    - by michael
    hi im tryin to use the return from a jquery ajax call in my own function, but it keeps returning undefined. function checkUser2(asdf) { $.ajax({ type: "POST", async: false, url: "check_user.php", data: { name: asdf }, success: function(data){ return data; //alert(data); } }); } $("#check").click(function(){ alert(checkUser2("muma")); }); the ajax call definately works, because when i uncomment my alert i get the correct return, and i can see it in firebug. Am i doing something stupid.

    Read the article

  • How do I Reload Ajax Call Parameters without Reloading the webpage

    - by Snowright
    I'm working with Extjs 2.2.1 with Alfresco 3.2 enterprise. I would like to update the ticket that handles authentication to the alfresco server on components that have been loaded during login. This ticket expires after a set time and this is why I will need to update the ticket. Options that do not seem viable for me(but please let me know if I'm wrong): Reload the components to reload the call parameters - I can't do this because it resets whatever the user was previously working on (ie. Tree panel gets reloaded, grid filters reset, etc). The actual webpage never reloads as everything uses ajax calls to update things on the page. Create a global variable that stores the ticket and attach it as a call parameter with any ajax calls - Any components that were loaded during login will still use the original ticket to make calls to the server.

    Read the article

  • How To: Call a web service from ajax

    - by Kolten
    I have a simple Web Service that send email and is called via: public bool SendMail(string format, string from, string to, string cc, string bcc, string subject, string body, string replyTo) I have never used ajax before, and find I need to call this service and pass form contents to it from a simple html page (I cannot use asp or asp.net unfortunately). Can I get a quick rundown of what is required? I have searched for simple examples, but find I am having difficulty understanding how to call it and pass the parameters required of the Web Service. Thanks all!

    Read the article

  • Java-Recursion: When does statements after a recursive method call executes

    - by Ruru Morlano
    When are statements after the method call itself going to execute? private void inorderHelper(TreeNode node) { if ( node==null ) return; inorderHelper(node.leftNode); System.out.printf("%d", node.data); inorderHelper(node.rigthNode); } All I can see is that the line of codes inorderHelper(node.leftNode) will continue to iterate until node == null and the method terminates immediately before node.data is printed. I think that I didn't get well recursion but all examples I can find doesn't have statements after the recursive call. All I want to know is when are statements like System.out.printf("%d",node.data) going to execute before the method return?

    Read the article

  • Call an action from another controller

    - by Brian
    I have two different objects: contracts, and task orders. My requirements specify that in order to view the Details for either object, the Url should be "http://.../Contract/Details" or "http://.../TaskOrder/Details" depending on which type. They are both very similar and the details pages are almost identical, so I made a class that can either be a contract or a task order, and has a variable "objectTypeID" that says which type it is. I wrote the action "Details" in the task order controller, but now I want to call that from the contract controller instead of recopying the code. So is there any way to have the url still say ".../Contract/Details" but call the action in the TaskOrder controller instead? I tried using TaskOrderController TOController = new TaskOrderController(); TOController.Details(id); This would have worked except that I can't use the HttpContext.Session anymore, which I used several times in the action.

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >