Hi all,
I'm totally stuck trying to find a way of moving the imagefield preview of a Drupal 6 cck form to another div on the page.
The desired process using a cck form and some javascript:
click browse,
click upload,
imagefield widget uploads the file then creates a an image preview.
Once this is done I need to triger a javascript func...
I have a C# application using a C++ DLL. The C++ DLL is extremely simple. I can call one method, and it has a callback method. The callback method must finish before I can process the next item.
The problem is, I can only process one command at a time, but I want to process them as fast as possible.
Fake/simplified code interface for c...
Hi,
I'm surprised this question wasn't asked before on SO (well, at least I couldn't find it).
Have you ever designed a method-callback pattern (something like a "pointer" to a class method) in C++ and, if so, how did you do it ?
I know a method is just a regular function with some hidden this parameter to serve as a context and I hav...
So, I have a page that loads and through jquery.get makes several requests to populate drop downs with their values.
$(function() {
LoadCategories($('#Category'));
LoadPositions($('#Position'));
LoadDepartments($('#Department'));
LoadContact();
};
It then calls LoadContact(); Which does another call, and when it retur...
I googled near and far, but couldn't get an example of how you associate a callback to the click event in matlab. Can someone show me an example?
...
I have a before_save that calculates a percentage that needs to include the object that is being updated. Is there a one-liner in Rails that takes care of this?
for example and this is totally made up:
Object.find(:all, :include => :updated_object)
Currently I'm sending the object that is getting updated to the definition that calcul...
Object.update_attribute(:only_one_field, "Some Value")
Object.update_attributes(:field1 => "value", :field2 => "value2", :field3 => "value3")
Both of these will update an object without having to explicitly tell AR to update.
Rails API says:
for update_attribute
Updates a single attribute and saves the record without going throug...
I've Got a program that uploads/downloads files into an online server,Has a callback to report progress and log it into a textfile, The program is built with the following structure:
public void Upload(string source, string destination)
{
//Object containing Source and destination to pass to the threaded function
Ke...
I have a WCF service using callbacks to communicate to a Silverlight client. Everything is up and working, but it's taking an awful long time to send the message (over half a second). I fired up the WCF Debugger and the step "Create a message" is taking over half a second to complete. It's a simple DataContract with ~12 properties, no...
Inside a jQuery event handler, I would like to scroll the window and then add a class to something. This is my code:
$('#foo').click(function() {
window.scrollTo(y);
$('#bar').addClass('active');
});
$(window).scroll(function() {
$('#bar').removeClass('active');
});
Notice I have another handler to remove that same ...
Here's what I have so far:
IService:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
namespace ServiceLibrary
{
[ServiceContract(SessionMode = SessionMode.Allowed, CallbackContract = typeof(IServiceCallback))]
public interface IService
{
[OperationCon...
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);
},
...
to show my problem in a couple examples...
THIS WORKS
$.post("SomePage.aspx", { name : "value" },
function (data) {
alert(data);
}, "text");
THIS DOESN'T WORK
$.post("SomePage.aspx", { name : "value" },
function (data) {
window.open("http://www.google.com");
}, "text");
In the ...
Hi,
I have been reading templates,functors,callback function for the past week and have referred some good books and articles.
I however feel that, unless I can get good practice - programming in templates and use functors-callbacks there is no way I can really understand all the concepts or fluently use them while coding.
Could any...
i have to create a variable that is callable with php's is_callable
i have done this:
$callable = array(new MyClass, 'methodName');
but i want to pass a parameter to the method.
how can i do that?
cause using symfony's event dispatcher component will be like:
$sfEventDispatcher->connect('log.write', array(new IC_Log('logfile.txt'...
LS,
Let me first explain what I'm trying to achieve using some pseudo-code (JavaScript).
// Declare our function that takes a callback as as an argument, and calls the callback with true.
B(func) { func(true); }
// Call the function
B(function(bool success) { /* code that uses success */ });
I hope this says it all. If not, please c...
Is there an easy way to set a "callback" function to a new window that is opened in javascript? I'd like to run a function of the parent from the new window, but I want the parent to be able to set the name of this particular function (so it shouldn't be hardcoded in the new windows page).
For example in the parent I have:
function DoS...
Hello, I am interested in implementing the facebook "Like" button, but I would like to know what user is clicking on this button so I can get some useful information from this. From what I have read, facebook is leaving us in the dark on who is clicking on what. ANyone have an idea on how I could track which user clicked on a like button...
Has anyone gotten callbacks working with Guillermo Rauch's TextboxList Autocomplete? I've tried multiple ways to bind and multiple events (e.g. hover) - nothing seems to register.
$('#entSearch').textboxlist({unique: true, plugins: {
autocomplete: {
minLength: 3,
queryRemote: true,
...
Is there a delegate protocol that includes a callback for the end of animated changes to UITableView? Particularly reloadSection/Rows?
...