bind

jquery xml slideshow using ajax

Hi all, I am trying to create a JQuery based slider using ajax to load images url from a xml file and then creating a html li list dynamically. Till now I am able to append and create DOM structure using Jquery. But I am not able to access the dynamically created list. I have also tried custom events using bind but not able to succes...

jQuery character counter inside newly created tooltip

I'm having a difficult time figuring this one out. I'm attempting to have a user open a tooltip (using jQuery qTip). What this does is create a "new" tooltip element on the page; it takes it from an existing hidden HTML div on the webpage. Once this new tooltip is created, it has a character counter that is supposed to dynamically up...

Silverlight 4 how to format a binded decimal value

Hey, sorry for my bad english... I have a very simple textbox on my sl4 app, like this: <TextBox Text="{Binding Source={StaticResource Valor}, Path=ValorReal, ValidatesOnExceptions=True, Mode=TwoWay, ValidatesOnDataErrors=True, StringFormat=\{0:c\}, NotifyOnValidationError=True}" /> and a class like: public class Valor: INotifyPrope...

boost::bind and << operator in C++

I would like to bind the << stream operator: for_each(begin, end, boost::bind(&operator<<, stream, _1)); Unfortunately it does not work: Error 1 error C2780: 'boost::_bi::bind_t<_bi::dm_result<MT::* ,A1>::type,boost::_mfi::dm<M,T>,_bi::list_av_1<A1>::type> boost::bind(M T::* ,A1)' : expects 2 arguments - 3 provided c:\source\repo...

Before after select event validation and results with jquery

I am using a javascript function (F) (jquery )which uses 3 select values selected by the user to calculates a value - R(result) R is a number ranging from (1 through 9), (11) and (22); I need 2 extra steps one before the calculation and one after. a. Before calculation takes place: Make sure all three select values are changed before...

Can Internet Explorer bind events to absolute positioned elements ?

Can Internet Explorer bind events to absolute positioned elements ? I can't bind a "click" to an element that is overlapping another. Have tried loads of different ways, here a few tests that don't work in IE: //version 1: $(".classHolder").click(function(){ alert( $(this).html() ); }); //version 2: $(".classHolder").each(function()...

How do I bind a jQuery Tools overlay event to an existing overlay?

Say when the page loads, this code runs: jQuery(document).ready(function($){ $('#overlay').overlay( api: true ); }); How would I bind an event to it? I've tried: $('#overlay').onBeforeLoad( function(){ alert('Hi'); }); $('#overlay').bind( 'onBeforeLoad', function(){ alert('Hi'); }); var api = $('#overlay').data('overlay'); api.o...

Symfony: How to hide form fields from display and then set values for them in the action class

I am fairly new to symfony and I have 2 fields relating to my table "Pages"; created_by and updated_by. These are related to the users table (sfGuardUser) as foreign keys. I want these to be hidden from the edit/new forms so I have set up the generator.yml file to not display these fields: form: display: General: [name, template_i...

jQuery event binding does not work properly or i can't make it properly working

HTML: <input id="email" name="email" type=text /> <input id="password name="password" type="password" /> JavaScript: var fields = ["email","password"]; for (var i in fields) { var field = $("#"+fields[i]); field.bind({ focus: function() { field.css("border-color","#f00"); }, blur: function(...

JQUERY, getting two BINDs/Clicks to play nice together?

I have the following line of code: <li id="1" class=" "> <a href="">Parking Lot</a> <span id="1" class="list-edit">edit</span> </li> I then have two binds: $("#lists li").click(function(){....... $(".list-edit").click(function(){......... The problem I'm having is I need the LI to contain the EDIT span because of CSS styling reaso...

bind() fails with windows socket error 10038

I'm trying to write a simple program that will receive a string of max 20 characters and print that string to the screen. The code compiles, but I get a bind() failed: 10038. After looking up the error number on msdn (socket operation on nonsocket), I changed some code from int sock; to SOCKET sock which shouldn't make a differe...

Noob boost::bind member function callback question

#include <boost/bind.hpp> #include <iostream> using namespace std; using boost::bind; class A { public: void print(string &s) { cout << s.c_str() << endl; } }; typedef void (*callback)(); class B { public: void set_callback(callback cb) { m_cb = cb; } void do_callback() { m_cb(); } p...

Oracle/c#: How do i use bind variables with select statements to return multiple records?

I have a question regarding Oracle bind variables and select statements. What I would like to achieve is do a select on a number different values for the primary key. I would like to pass these values via an array using bind values. select * from tb_customers where cust_id = :1 int[] cust_id = { 11, 23, 31, 44 , 51 }; I then bind a...

Jquery bind doesnt work on AJAX loaded HTML

Hi, This is my jquery code jQuery(document).ready (function() { // post $('.post').bind('mouseenter mouseleave', function() { $(this).filter('.btn').toggleClass('hidden'); }); }); It works great on a normal document. but When I load some HTM: (i.e some divs with .post attributes) using ajax and embed it into my ...

Work with function references

Hello, I have another one question about functions reference. For example, I have such definition: typedef boost::function<bool (Entity &handle)> behaviorRef; std::map< std::string, ptr_vector<behaviorRef> > eventAssociation; The first question is: how to insert values into such map object? I tried: eventAssociation.insert(std::pair...

Linux: Finer-grain control of INET listen socket binding?

I have interfaces lo, eth0, and eth0:1. progA creates a listen socket, and binds it to port p on INADDR_ANY. Simultaneously, I would like to use ncat to port forward, listening on the same port p, but only on the IP address associated with eth0:1. As expected, ncat is failing with "address already in use". What I would like to b...

jQuery - Can't seem to .live() bind to a label element. Why?

Here's my code: HTML: <ul id="more-items"> <li><label class="button">hi</label></li> <li><label class="button">hi</label></li> <li><label class="button">hi</label></li> </ul> Javascript: $('ul#more-items label.button').live('click', function() { alert(1); }); Clicking on the labels doesn't cause the alert() to fire. Th...

JQUERY bind .unbind

I have an accordion which has different sections to save and display different types of information. But there is only one save button to handle all the sections. If anyone can please give me a clue on how to achieve this using jquery bind and unbind. ...

Boost ASIO Headache

Man... thought using ASIO in Boost was going to be easy and intuitive. :P I am starting to get it finally but I am having some trouble. Here's a snippet. I am having several compiler errors on the async_accept line. What am I doing wrong? :P I've based my code off of this page: http://www.boost.org/doc/libs/1_43_0/doc/html/boost_asio/t...

How to run SQL that contains bind variables in the ODT Query Window?

How do you run SQL that contains one or more bind variables in the Oracle Developer Tools for Visual Studio Query Window? For example, the following works fine in SQL*Plus: variable x NUMBER; BEGIN :x := 0; END; / SELECT 1 FROM DUAL WHERE :x <> 1; When executed in the ODT Query Window, the following exception is raised in the Query...