I am using Rails and jQuery, making an ajax call initiated by clicking a link. I setup my application.js file to look like the one proposed here and it works great. The problem I'm having is how can I use $(this) in my say.. update.js.erb file to represent the link I clicked? I don't want to have to assign an ID to every one, then recomp...
Is there a way to place a sql query and call a callback function in C++ when the results are ready?
I know there is a way to do this in ado.net, but this is a native environment, so I can't use .net.
...
Any clues on how to do it ?
...
Hi,
I am trying to get jQuery tabs to behave like IE and Firefox. I have a few tabs with an "addtab" at the end. When this tab is clicked a new tab is added, this is fine. But i want to select the second last tab. This is proving to be quite difficult.
my init code is
$tabs =$("#tabs").tabs({
add: function(event, ui) {
...
ActiveRecord use to call after_save callback each time save method is called even if the model was not changed and no insert/update query spawned.
This is the default behaviour actually. And that is ok in most cases.
But some of the after_save callbacks are sensitive to the thing that if the model was actually saved or not.
Is there a...
I have a modal window that presents a form to users. The form includes one or more file uploads as well. Therefore I cannot submit the form with ajax.
At the moment I'm doing a standard submit with a submit button. When the form is submitted (which takes a few seconds in general), a PDF is generated and sent back for download (i.e. the...
In my application, I'm executing a transaction which can be in three different states at the end of the execution:
Success
Failure
Pending
Depending on the state, the application client will want to perform different actions. In the case of success, they will want to retrieve the transaction result (a Widget). In the case of failur...
Inside a c# application a c#-method with parameter is to be called from a delphi dll:
The C# method gets called, but the int param is not transfered correctly: some "random" value arrives.
The C#-method is passed to the delphi dll via a register method:
[UnmanagedFunctionPointer(CallingConvention.ThisCall)]
public delegate void...
I'm doing a Facebook Connect integration for a site and when the user logs in, I need to ask for some permissions so I use FB.Connect.showPermissionDialog. I use its callback to see if permissions were granted. If they are granted, I want to submit the form. Here's what my code looks like:
$("#form3").live("submit", function() {
FB.Co...
My code works and I animate, but I'm not sure how to do this:
http://stackoverflow.com/questions/296967/animation-end-callback-for-calayer
...in MonoTouch.
Here's what i've got:
public partial class MyCustomView: UIView
{
// Code Code Code
private void RunAnimation()
{
CAKeyFrameAnimation pathAnimation =...
I have a WCF client & service, where service (which is hosted inside a console app) calls back to client using ever so standard WSDualHttpBinding with WSDualHttpSecurityMode.None. It's all fine and dandy when hosted on a local machine, but as soon as I move service to a computer other than my local machine (but on the same network), clie...
I want to turn an asynchronous function to the synchronous.
function fetch() {
var result = 'snap!';
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?", function messyCallback(data){
result = data;
});
return result;
}
document.write(fetch());
See in action
...
I'm trying to toggle a UI Button from a callback of a POST operation. The jquery UI Button would either need to have "ui-icon ui-icon-minus" or "ui-icon ui-icon-checked" as a span.class
I tried to toggle - but toggle only removes and adds back a part of the class - it doesn't exchange the whole class. This is where I'm stuck at right no...
Hi, all.
I'm working on a new feature for my Mac application and it has to do with maps. As an example, let's use iPhoto's "Places".
iPhoto uses Google Maps to show the location of various photos with red pins.
Now when I click onto one of those pins, the application itself - iPhoto - reacts to that click, not the WebView / the map. So...
I'm thinking of implementing a HTML welcome panel to our Android app, which presents news and offers on the start-up screen. My question is now, if I present an offer to a specific place (with an id string) can I trigger a callback from the WebView (maybe via Java Script) to the Android app and passing that id string to make it start a n...
I would like for preg_replace_callback to use a library function from CodeIgniter as its callback. My current unsuccessful attempt is the following:
$content = preg_replace_callback('/href="(\S+)"/i',
'$this->util->url_to_absolute("http://www.google.com","$matches[0]")',
$content);
But I haven't had any success. I've tried usi...
I have a simple ajax call:
$.ajax({url: my_url_here,
dataType: 'text',
success: function(data, textStatus) {
if(textStatus == "success") {
alert('success');
}
else {
alert('fail');
}
},
error: function(XMLHttpRequest, textStatus, ...
Is it possible to invoke Java RMI asynchronously? I'd like my RMI call to return immediately and for the server to invoke a callback once a task is completed.
I'd currently using RMI support from Spring framework, and i couldn't find any documentation describing it in spring, I suspect I'll need to implement it myself. Please provid...
I'm trying to overload the XMLHttpRequest.* method in JavaScript so a webpage can figure out if an Ajax request took place without using any intrusive callbacks. Now, something like this works relatively fine when using most JS frameworks:
XMLHttpRequest.prototype.getResponseHeader = function() {
alert('O hai, looks like you made an AJ...
Hello Android Developers!
My Android Java Application needs to record audio data into the RAM and process it.
This is why I use the class "AudioRecord" and not the "MediaRecorder" (records only to file).
Till now, I used a busy loop polling with "read()" for the audio data. this has been working so far, but it peggs the CPU too much.
B...