multiple

jQuery clone infinite times?

The way jQuery's .clone() seems to work, once you insert a cloned object somewhere, you cannot insert it again another time without re-cloning the original object. For example, if you do this: var cloned = $('#elem1').clone(); $('#elem2').after(cloned); $('#elem2').after(cloned); Only one copy of elem1 will get copied and the second a...

Get last clicked option in multiple select

On a page, I have a select (multiple) box with many options. Now I want to react on the last clicked item to display some data with ajax. As the "click" event on the option element does not work in IE, I currently use the "change" event. The problem is, that the "value" and the selectedIndex attribute point to the first selected item, ...

binding a winforms control's property to multiple object properties

I am looking for a solution to bind a property of a windows forms control (Text of a button or a label) to multiple properties of one (or more) objects via a formatting string. Basically, the displayed text on a button should look like "static text $1 more static text $2" where $1 is bound to the to the property of an object and $2 is bo...

Insert multiple records using Linq to Entities (EF)

I have a map table (tblUserRoles) which can contain multiple records. When i insert only one record using L2E it saves but when try to save multiple records it gives exception. I am saving like this: foreach (tblUserRoles u in InsertUserRole) { EntityHelperUtil.AddObject(context, "tblUserRoles", (IEntityWithRelationships)u); ...

jquery slide toggle divs without creating multiple classes, functions, etc... ui accordion

Greetings, based on the jquery ui accordion I'm using, I have added a slide toggle to my accordion list items. so what happens is I click on an li and a div slides down underneath to reveal more content. The issue I'm having is that I find myself having to create multiple id's to reference the slidetoggle. example of the div i...

Can I have multiple CommandBindings for the same Command on the same control?

I have a UserControl that adds a CommandBinding to it's CommandBindings collection to handle a specific Command. Later I use this control in a window and want to add another binding to that same control to add additional behavior. The problem though, is that when I do this it seems that when I add another CommandBinding to the CommandBin...

JQuery - Multiple Select Options

I am trying to grab all selected items in the following select multiple and separate them by a comma. The code is below: <select id="ps-type" name="ps-type" multiple="multiple" size="5"> <option>Residential - Wall Insulation</option> <option>Residential - Attic /Crawl Space Insulation</option> <option>Residential - Foundatio...

How to change A's html site when B does something.

Say we have users A and B which visit the same URL containing a button. When A clicks on the button, I want something on B's website to change immediately while B is on it, e.g. a text to be added. I want this to happen with a delay of less than 150ms. Is this realistic? Could you give me hints as to what I should search for, or toy exa...

how to insert multiple rows using cakephp

In the cakePHP project I'm building, I want to insert a defined number of identical records. These will serve as placeholders records that will have additional data added later. Each record will insert the IDs taken from two belongs_to relationships as well as two other string values. What I want to do is be able to enter a value for th...

jQuery: multiple live event bindings

How do I do the live event (for when new content is injected) with the new way of doing multiple jQuery events: $('.foo', this).bind({ click: function() { //do thing }, mouseover: function() { //do other thing }, mouseout: function() { //do other other thing }, focus: function() { ...

Using horizontal accordion jQuery plugin for multiple websites

Is it possible to use a horizontal accordion plugin such as this one that opens web pages inside each slide? For example, one slide would be your email client, another could be a social networking site, and so forth. ...

how to validate multiple steps FORM

I have query how to validate multiple step form, i create a form and it has a three sections in a same page, 1.Personal Info, 2.Contact info, 3.Conformation details. My question is: If these specific inputs of step1 are all valid and return “true” in #Form, the step-two button will (be activated/take you to the next step) and similar...

PHP: multiple commands in die/exit

when it gives a error I want him to do 2 things. echo nl2br($qVraagOp); mysql_error(); so i thougth: $rVraagOp = mysql_query( $qVraagOp ) or die( echo nl2br($qVraagOp); mysql_error(); ); I can write a function that does these two things and then call that but that a bit redundant. is there a other way? Matthy ...

C++ multiple inheritance preventing diamond

Is there a way to define a class Foo in C++ so that I can inherit from it I can't "diamond inherit" from it I.e. class Cat: public Foo{} // okay class Dog: public Foo{} // okay class Weird: public Cat, public Dog {} // I want this to throw a compiler error ...

Multiple solr instances within Jetty or run Multiple Jetty servers, which is less intensive?

Hi, I am about to embark upon a new linode VPS server.I currently use both Tomcat and Jetty (on my development server) to serve different Solr, but having read around a bit I realise Tomcat can be quite a resource hog, hence the suggestion for me to use Jetty. I already have a Jetty development server set up with an application in Jetty...

SQL Search based on multiple values without Intersect

I am trying to search for items (members) that match 0 or more field values in a simple table. I have a solution using INTERSECT, but would like to know if there as a better/simpler solution. Simplfied Scenario: A user will select 0 to 3 fields as search criteria. For each chosen field, the user will select (combobox) a value. These...

Search for multiple words with jQuery Autocomplete

I am really struggling with jQuery's autocomplete plugin. I have a large field in my database with multiple words in it, seperated by spaces: forename surname address postcode I can get the autocomplete to search for a single word. E.g. if I type "forename" I get an output of: forename surname address postcode. However, if I ...

Load Module Default Views In Region to Create Menu

I am builng an M-V-VM application with Dynamic Loading of modules at runtime. Each of these Modules has a default view which individulally they show on the selected region when I go _regionManager.Regions["BottomMenuRegion"].Add( Container.Resolve<AdminModuleView>(), "AdminView", true); However, When the Next Module loads it ove...

Multiple WCF services referencing the same data contracts

I am building a set of WCF services that share common data contracts (or entities if you prefer). These are simple data transfer objects that are decorated with DataContract and DataMember attributes. I am explicitly specifying the name and namespace. In trying to follow the principles of IDesign's recommendation of averaging 12 members ...

Proper methods to have multiple processes reading the same file?

I have many processes reading a file stored on a network share. Originally I was only able to have one process read the file, all the others would throw exceptions. I implemented the following code to deal with that: using (StreamReader fileStreamReader = new StreamReader(File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read)))...