Search Results

Search found 1816 results on 73 pages for 'attach'.

Page 48/73 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • This should be real easy. How to find a button through its Value (Jquery Selector)

    - by Raja
    I have this HTML: <div id='grid'> <input type="button" value="edit"/> <input type='button' value='update'/> </div> How to I attach a click event only to Update button. I know I could add a class to it or specity an id but both are not possible since it is in gridview. I tried this: $("input:button[@value='update']").click(function(){alert('test');}); but it displays an alert for both buttons. I know I must be doing something silly. Any help is much appreciated. Thanks Kobi for helping me out. Given below is the right answer. $("input[value='update']").click(function(){alert('test');});

    Read the article

  • Extension methods on a static object

    - by Max Malygin
    I know (or so I hear) that writing extension methods for a single stand alone .net class (not an implementation of IEnumerable) is potential code smell. However, for the sake of making the life easier I need to attach a method to the ConfigurationManager class in asp.net. It's a static object so this won't work: public static List<string> GetSupportedDomains(this ConfigurationManager manager) { //the manager needs to be static. } So the question is - is it possible to write an extension method for a static class in .net?

    Read the article

  • How can I save/print values in my WATCH list in Visual Studio 2008?

    - by Rising Star
    When I attach the Visual Studio 2008 debugger to my web server process, I sometimes browse a large amount of data in my watch list. Suppose I have an array of string variable that I expand to show 20 entries. It seems that the only way to save these values is to copy and paste them one at a time. I have gone so far as to do a screen-shot in order to have a record of what the values were (to refer to later or print a hard copy). Is there an easy way to save and print these values? I am familiar with the new "IntelliTrace" feature in Visual Studio 2010 Ultimate, but it seems overkill for this purpose. I just want to take something like an array of strings and save it for later reference once I've stopped the debugger. What's a good way to do this?

    Read the article

  • Html.ActionLink in a button

    - by Pomster
    I Am trying to connect to a method in my controller, with a button. I can connect though this link: @Html.ActionLink("Print", "Print", new { id = Model.SalesContractId}) But i Don't want a link, i want my button on my dialog to do it. I have tried the following: $('#btnDialogPrint').click(function () { location.href = '<%= Url.Action("Print", "Print", new { id = Model.SalesContractId}) %>'; }); But it just redirect me to a page that say bad request. namespace Contract.Controllers { public class ContractController : Controller { CompassEntities db = new CompassEntities(); public ActionResult Print(int id) { return View(""); // This can be removed and Print code may be added } Don't worry about the code inside i will get to that once i get inside this method. Could i maybe attach a link here? <input type="button" value="Print" id="btnDialogPrint" />

    Read the article

  • Can entities be attached to an ISession that weren't previously attached?

    - by TheCloudlessSky
    I'm playing around with NHibernate 3.0. So far things are pretty cool. I'm trying to attach an entity that wasn't detached previously: var post = new Post(){ Id = 2 } session.Update(post); // Thought this would work but it doesn't. post.Title = "New Title After Update"; session.Flush(); Is this possible so that only Title gets updated? This is currently possible in EntityFramework. I'd like to not have to load Post from the database when I just need to update a few properties.

    Read the article

  • Read data from an Android USB attachment

    - by Mark
    Is there anyway to read data from an attachment through the USB port on an Android device? In particular, an EKG. Most the work can be done by the hardware of the device to simplify the output to a single number, a voltage reading. If its not possible, what about modifying an accessory that can already communicate with an android device? Thinking of devices that attach to android phones, what about sending the data as an audio signal to be read as the microphone from a headset and then analyzing the audio signal to convert it to a number that can be used to display a value. Any ideas on how to make this work?

    Read the article

  • Saving a modified object from ASP.NET MVC View Using Entity-Franework 4

    - by Dani
    I retrieve an object graph from DB using EF4. The context is closed as soon as the data retrieve and the data passes to the controller, and then to the view. in the view the data is modified, and then the controller gets it back. From the controller I run Repository.Update(MyEmp); and in my repository the code goes: using (var context = new mydb()) { if (myEmp.ID != 0) // Checking if it's modified or new { context.Emp.Attach(MyEmp); int result = context.SaveChanges(); return myEmp.ID; } } The problem - once attached, the object entityState goes to unchanged, and not modified, and of course - nothing is saved to the database. What am I doing wrong ?

    Read the article

  • How to add an audio filter to AudioRecord (on Android)?

    - by Jim
    I would like to write a "daemon" application that will add a special audio filter (e.g. audio enhancement) to AudioRecord. The result should be as follows: Whenever any VoIP application (e.g. Skype,...) will create an AudioRecord, the captured audio will be first filtered using my daemon application before it reaches Skype. Is this doable ? For example can I use an AudioSessionID=0 to attach my filter to all the input channels ?

    Read the article

  • Entity framework Update fails when object is linked to a missing child

    - by McKay
    I’m having trouble updating an objects child when the object has a reference to a nonexising child record. eg. Tables Car and CarColor have a relationship. Car.CarColorId CarColor.CarColorId If I load the car with its color record like so this var result = from x in database.Car.Include("CarColor") where x.CarId = 5 select x; I'll get back the Car object and it’s Color object. Now suppose that some time ago a CarColor had been deleted but the Car record in question still contains the CarColorId value. So when I run the query the Color object is null because the CarColor record didn’t exist. My problem here is that when I attach another Color object that does exist I get a Store update, insert error when saving. Car.Color = newColor Database.SaveChanges(); It’s like the context is trying to delete the nonexisting color. How can I get around this?

    Read the article

  • Replace the callback for a GtkItem created from a GtkItemFactoryEntry

    - by rampion
    I'm writing a plugin that's modifying an existing UI. One thing I want to do is change what an existing menu item does. This is all using the Gtk library. The menu item (a GtkItem) is created from a GtkItemFactoryEntry (which is out of my control), and has its current behaviour defined by the callback in the GtkItemFactoryEntry. I can get handle on the menu item using gtk_item_factory_get_widget() and attach further actions to the menu item using gtk_signal_connect(), but I can't seem to disconnect the original callback using gtk_signal_disconnect() or gtk_signal_disconnect_by_func(). Is there any way I can remove or replace the original callback?

    Read the article

  • attaching multiple files to a domain class

    - by Emyr
    I've seen various Grails plugins which allow easier handling of file uploads, however these tend only to support a single file per form-submit. I'd like a multi-attach form where as soon as you pick one file, an extra field and button is added using JS (various sites do it like this). Do you know of any good plugins which provide elegant uploading of multiple files without excessive coding? A progress bar either per-file of for the whole process would also be very nice. I don't know to what extent I can allow GORM to handle a java.io.File field (or in this case a Collection<File>).

    Read the article

  • Freezing a listboxitem while items are being added

    - by siz
    We have a ListBox that has a number of items. Items are inserted into the ListBox via an ObservableCollection. Some of these items can be edited right in the ListBox. However, if an item is added at an index < the edited item's index, the entire content of the ListBox moves down. What we'd like to do is the following: if an item is in edit mode, we'd like to freeze its position on the screen. It is fine if items are added to the collection and the UI around the item changes. But the position of the item should remain constant on the screen. The only thing I've been able to do so far is attach to the ScrollChanged event and, at most, use either BringIntoView or ScrollIntoView methods to ensure that the item is always displayed somewhere in the UI, but I am unable to lock down its position. Has anyone done something like this and help out?

    Read the article

  • Delete Entity in Many to Many Relation. Don't get error but entity is not deleted

    - by Shapper
    I have, in EF5, two entities: User and Role. Between User and Role there is a many to many relation. I don't have an entity for the UserRoles database which sets the relation. I have a User and I want to delete a role without loading it from the database. Context context = new Context(); User user = context.Users.First(x => x.Id == 4); user.Roles = new List<Role>(); Role role = new Role { Id = 20 }; context.Roles.Attach(role); user.Roles.Remove(role); context.SaveChanges(); I don't get any error but the role is not removed. Any idea why? Thank you, Miguel

    Read the article

  • SQL Server 2005: When clicking "Add" database I keep getting 'verify that the path or file exists'

    - by Code Sherpa
    When I right click on "databases" in Sql Server 2005 Management Studio and then Attach... Add I get the following error: C:\Documents and Settings\Administrator\My Documents\SQL Server Management Studio\ Projects\Path\To\MDF\And\LDF\Files\ cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists. The answer is easy - the MDF and LDF files where removed when Nant (by way of my dev machine) issued a drop command. But, after replacing the MDF and LDF files, I want to reattach the database but the above error keeps coming up when I select "Add". Also, I have already "unattached" the database in question and it no longer appears on the left under "databases". I have tried to replace a copy of the MDF and LDF files in the folder being referenced and that didn't work. Any ideas as to how to gracefully get rid of this error?

    Read the article

  • How to put buttons in a html page in a jQuery dialog

    - by Robert
    eHello everyone,the following is my code to display a jquery dialog window with a closing button "OK": <script type="text/javascript"> $(function(){$("#dialog").dialog({autoOpen:false,bgiframe:true,buttons: { "OK": function() { $(this).dialog("close"); } }, width:500, height: 350, modal: true, show: 'slide', hide:'slide', title:"Similar Trends Detected in 2nd DataSet"}); $("#userid").focus(); }); function showForm(matches){ $("#dialog").html(matches).dialog("open");} Currently it runs by supplying a string variable "matches",then the content of the variable gets displayed on the dialog frame. Now me and my teammate want to extend this dialog a little,we want to attach a button to every line inside the html content("matches" variable),please note that we don't want buttons in the dialog(like another "OK" button),but we want buttons "inside" the frame (the actual html content). So I would like some help here,how could I modify my "matches" variable,to have buttons also shown inside the dialog. Thanks.

    Read the article

  • jQuery on/delegate correct syntax

    - by KryptoniteDove
    As the jQuery API is currently down, is anyone able to assist me with the below? I am ajax loading an unordered list into the web page and need to be able to attach hover and click events to the list items. <ul> <li class="option">Item 1</li> <li class="option">Item 1</li> <li class="option">Item 1</li> </ul> So far I have tried a few variations of the below jQuery code using .on for version 1.7+ $("ul").on("click", "li .option", function(){ alert($(this).text()); }); Can anyone point me in the right direction? I'm aware that .live has been depreciated and that .delegate has been superceeded so really only looking for a solution that will allow me to use .on. Thanks as always!

    Read the article

  • Add method to Array in Javascript

    - by user1167650
    Is it possible to add a method to an array() in javascript? (I know about prototypes, but I don't want to add a method to every array, just one in particular). The reason I want to do this is because I have the following code function drawChart() { //... return [list of important vars] } function updateChart(importantVars) { //... } var importantVars = drawChart(); updateChart(importantVars); And I want to be able to do something like this instead: var chart = drawChart();<br> chart.redraw(); I was hoping there was a way I could just attach a method to what i'm returning in drawChart(). Any way to do that?

    Read the article

  • What is the proper design of storing temporary users? [closed]

    - by Mendy
    In SO site both real users and temporary users can add a new questions. I assume each user type has a different table. My question is how can I attach the question to the right user? I assuming the temp users have their own table from the following reasons: Temp users don't have all the data that real users have. like: email, password, and all users details. On the other hand, temp users are a lot more then real users. So it make more sense to have they in their own table.

    Read the article

  • HTML chrome:// page with select box, onChange failing

    - by Noitidart
    I have a html page. It is chrome://. I have a select box. Giving it the oncommand attribute won't work. So I have to use onchange however you have the typical problem with onchange where it doesnt work if user uses the keyboard arrows, or letters of items to change things. Is there anyway to attach onCommand to my select box? I want to avoid to use onkeyup as then i have to to validation to see if it really changed (which would require me saving previous values).

    Read the article

  • Eclipse debug - line: not available

    - by Mike
    I can't seem to find anything on google telling me why this might be and what the resolution is. I'm Stepping through third party code (that I have the source for) and would really like to see the current line being executed... Looking at javac compile flags, I see the -g:none flag. If this flag is set, would this be enough to explain why I'm not able to see line numbers? If so, why would someone do this, are there performance implications? Do I need to recompile the jar myself to attach the missing debug info (if possible)? Thanks!

    Read the article

  • Can I play any Buffer only once at a given time?

    - by mystify
    From the OpenAL documentation: The basic OpenAL objects are a Listener, a Source, and a Buffer. There can be a large number of Buffers, which contain audio data. Each buffer can be attached to one or more Sources My problem is, that I have one sound file which I need to play multiple times per second, at the same time. The sound is 2 seconds long. So it will overlap. Would I need multiple filled buffers for this (= multiple times that sound in memory)? If I would attach one Buffer to multiple Sources, would I be able to play the sound 10 times, overlapping itself, with just one copy in memory? Or would I still have to deal with 10 copies of that sound in memory?

    Read the article

  • jquery plugin pattern using jquery.data

    - by web_dev
    I have seen this piece of code in jquery plugin patterns and the notes section mention that we could attach the plugin to the DOM element using the jQuery.data function. What I don't understand is how do I make use of this piece of code. Can somebody provide examples of how to use this functionality and explain its significance? $.fn[pluginName] = function (options) { return $Extend(this).each(function () { if (!$.data(this, 'plugin_' + pluginName)) { $.data(this, 'plugin_' + pluginName, new Plugin( this, options )); } }); };

    Read the article

  • Cannot get disable button to work.

    - by Scarface
    Hey guys, quick question, I have this javascript/jquery function that basically wraps an input in image brackets, and the first part of the function works, but the button does not disable after and I cannot figure out why (last line does not work). If anyone has an idea, let me know. Thanks in advance. <input id="2image" type="button" value="Attach" onclick="imageid('message')"> <script> function imageid(input) { var obj=document.getElementById(input); obj.value+="[image]image[/image]"; $("#2image").attr({ disabled:true, value:"Inserted" }); } </script>

    Read the article

  • Cannot find the certificate

    - by user409756
    We get a T-SQL (SQL Server 2008 R2) error on BACKUP CERTIFICATE: ERROR_NUMBER 15151, SEVERITY 16, STATE 1, PROCEDURE -, LINE 8, MESSAGE: Cannot find the certificate 'certificate1', because it does not exist or you do not have permission. We can see the certificate in master.sys.certificates. Our pseudo-code: copy an unattached template_db to db1 attach db1 create certificate1 (in stored procedure in master db) generate @password CREATE DATABASE ENCRYPTION KEY … ENCRYPTION BY SERVER CERTIFICATE '+@certificate_name +… (in stored procedure in db1) turn on Transparent Database Encryption for db1 using certificate1. (N'ALTER DATABASE '+@db_name+N' SET ENCRYPTION ON') N’BACKUP CERTIFICATE '+@certificate_name+N' TO FILE = '''+@certificate_file_path+N''' WITH PRIVATE KEY ( FILE = '''+@private_key_file_path+N''', ENCRYPTION BY PASSWORD = '''+@password+N'''' To try to work-around the error, we tested three ways with the BACKUP CERTIFICATE code in a different databases each time, including db1 and master. All get the same error. Any ideas? Thanks.

    Read the article

  • JavaScript OOP problem

    - by Danmark
    I create windows like this: var obj = document.createElement('div'); obj.className = 'window'; obj.style.width = 300 + 'px'; obj.style.height = 200 + 'px'; obj.style.left = 30 + 'px'; obj.style.top = 200 + 'px'; //and so on and what I need is to attach some data to each window. The data will be grabbed via Ajax and displayed in the windows. How should I do it so that each window hold its own unique data? I don't need to display the whole data every time and this data would need be organized before being displayed, so I can't just add it with innerHTML. I need a way to hold it somewhere else where I could easily get it and then display it with innerHTML.

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >