Search Results

Search found 1517 results on 61 pages for 'ben tew'.

Page 35/61 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • Why do jQuery fadeIn() and fadeOut() seem quirky in this example?

    - by Ben McCormack
    I've been playing with jQuery in an ASP.NET project and am finding some odd behavior with the .fadeIn() and fadeOut() functions. In the below example, a click on the button (ID Button1) is supposed to cause both the span of text with ID Label1 and the the button with the ID TextBox1 to do the following things: Fade Out Change the text of both the text box and the span of text to be You clicked the button Fade In Based on the browser I'm using, I get 3 different scenarios, and each element functions differently in each situation. Here's what happens when I actually click the button: TextBox1: In IE8, the text box fades out, changes text, then fades back in In IE8 Compatibility View, the text box fades out, changes text, then fades back in. However, the text in the box looks a little different than before the button was clicked. In FireFox 3.5.8, the text box doesn't fade out (but it does "pause" for the amount of time the fade would take), does change the text, then seems to "pause" again where it would be fading in. Label1: In IE8, the label doesn't fade out (but it does "pause" for the amount of time the fade would take), does change the text, then seems to "pause" again where it would be fading in. In IE8 Compatibility View, the label does fade out, change text, and fades back in, but the text looks a little different than before the button was clicked. In FireFox 3.5.8, the label doesn't fade out (but it does "pause" for the amount of time the fade would take), does change the text, then seems to "pause" again where it would be fading in. Two questions: What's going in to make each element to behave differently in different browsers? Is there a better way to get the functionality I'm looking for across multiple platforms? Here's the source code of the file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head><title> </title> <script src="http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.1-vsdoc.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#Button1").click(function(event) { $("#Label1").fadeOut("slow", function() { $(this).text("You clicked the button"); $(this).fadeIn("slow"); }); $("#TextBox1").fadeOut("slow", function() { $(this).val("You clicked the button").fadeIn("slow"); $(this).fadeIn("slow"); }); event.preventDefault(); }); $("a").click(function(event) { $("#Label1").text("You clicked the link"); $("#TextBox1").val("You clicked the link"); event.preventDefault(); }); }); </script> </head> <body> <form name="form1" method="post" action="Default.aspx" id="form1"> <div> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNTQwMjM5ODcyZGT6OfedWuFhLrSUyp+gwkCEueddvg==" /> </div> <div> <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAwK56uWtBwLs0bLrBgKM54rGBotkyyA5RRsPBGNaPTPCe7F5ARwv" /> </div> <div> <span id="Label1" style="color:#009900;">Type Something Here:</span> &nbsp; <a href="http://www.google.com">This is a test Link</a> <input name="TextBox1" type="text" value="test" id="TextBox1" style="width:258px;" /> <br /> <br /> <input type="submit" name="Button1" value="Button" id="Button1" /> </div> </form> </body> </html>

    Read the article

  • Is there a way to get an ASMX Web Service created in VS 2005 to receive and return JSON?

    - by Ben McCormack
    I'm using .NET 2.0 and Visual Studio 2005 to try to create a web service that can be consumed both as SOAP/XML and JSON. I read Dave Ward's Answer to the question How to return JSON from a 2.0 asmx web service (in addition to reading other articles at Encosia.com), but I can't figure out how I need to set up the code of my asmx file in order to work with JSON using jQuery. Two Questions: How do I enable JSON in my .NET 2.0 ASMX file? What's a simple jQuery call that could consume the service using JSON? Also, I notice that since I'm using .NET 2.0, I i'm not able to implement using System.Web.Script.Services.ScriptService. Here's my C# code for the demo ASMX service: using System; using System.Web; using System.Collections; using System.Web.Services; using System.Web.Services.Protocols; /// <summary> /// Summary description for StockQuote /// </summary> [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class StockQuote : System.Web.Services.WebService { public StockQuote () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public decimal GetStockQuote(string ticker) { //perform database lookup here return 8; } [WebMethod] public string HelloWorld() { return "Hello World"; } } Here's a snippet of jQuery I found on the internet and tried to modify: $(document).ready(function(){ $("#btnSubmit").click(function(event){ $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "http://bmccorm-xp/WebServices/HelloWorld.asmx", data: "", dataType: "json" }) event.preventDefault(); }); });

    Read the article

  • Ask for an example code for parsing xml and get attributes by using GData API

    - by ben
    When i use GData API in my app for parsing xml,how could i get attributes and it's value? Wanted a piece of example code.Thanks a lot. xml: <playurls><url islive="0" type="3" bit_stream="1">http://vods.netitv.com//dy2/2010/02/08/cf584b76-3579-4b75-a0c8-f7a473d79f8c.mp4 </url><url islive="0" type="3" bit_stream="2">http://vods.netitv.com//dy/2010/02/08/965bbc65-8ec0-4c50-98ae-c69a831926cc.mp4 </url><url islive="0" type="2" bit_stream="1">http://vods.netitv.com//dy2/2010/02/08/cf584b76-3579-4b75-a0c8-f7a473d79f8c.mp4 </url><url islive="0" type="2" bit_stream="2">http://vods.netitv.com//dy/2010/02/08/965bbc65-8ec0-4c50-98ae-c69a831926cc.mp4 </url></playurls>

    Read the article

  • ABAP - increment an integer

    - by Ben
    Hi there, sometimes ABAP drives me crazy with really simple tasks - as incrementing an integer within a loop... Here's my try: METHOD test. DATA: lv_id TYPE integer. lv_id = 1. LOOP AT x ASSIGNING <y>. lv_id = lv_id+1. ENDLOOP. ENDMETHOD. This gives me a strange error I can hardly translate to english..

    Read the article

  • TFS Build Configuration Vs Test Manager

    - by Ben
    Hi, I have been tasked with setting up TFS 2010 for my company. After setting up TFS and configuring the basics (New collection, project, adding solution to souce control), i thought i would try out some unit testing with it. I configured the Build Controller and Agent for my solution and added in some basic unit tests. These ran ok and did exactly what i would expect (i broke the build then ran the Build Definition, and it showed me where the errors were). My question is, what advantages (apart from the "Black box call stack logger") does Test Manager have over the TFS builds? Is it worth the extra effort of setting that up and configuring it? Only knowing the basics of what Test Manager is, that may be a very naive question to ask, and i appoligise if it is. Thanks

    Read the article

  • Newtonsoft JSON Interface Serialization error

    - by Ben
    I am using C# .NET 4.0, Newtonsoft JSON 4.5.0. public class Recipe { [JsonProperty(TypeNameHandling = TypeNameHandling.All)] public List<IFood> Foods{ get; set; } ... } I want to serialize and deserialize this Recipe object. If I serialize and deserialize the object during application lifetime this succeeds, but if I serialize the object, exit application and then deserialize it then it throws an exception, that it cannot instantiate IFood (since it is an interface). The problem is that it does not serialize the implementation of interface. "$type": "System.Collections.Generic.List`1[[NSM.Shared.Models.IFood, NSMShared]], mscorlib" I tried using TypeNameHandling.Object and Array and Auto, but it didn't help. Is there any way to serialize it properly? Or at least to define the class mapping before deserializing? EDIT: I am using JSON coupled with Hammock ( http://code.google.com/p/relax-net/ ), C# driver for CouchDB, which internally serializes and deserializes objects. As mentioned the problem is that it does not serialize the interface implementation.

    Read the article

  • software/languages for online structured data collection from (human) clients

    - by Ben
    I need to develop a web interface to collect and validate a range of data from many of my organization's clients. This isn't a single form, but a collection of forms with interdependencies (i.e., field X on form Y is needed if field A was equal to C on form B), and variable length lists (please provide the details for all Xs in your possession). I had a look at the marketing on Microsoft InfoPath and Adobe LiveCycle, but I get the impression that they're principally electronic forms solutions rather than data collection tools. (e.g., If a user has entered their address once, they should never have to see it on a form again). Any suggestions of good tools, applications or domain-specific languages?

    Read the article

  • detail disclosure indicator on UIButton

    - by Ben Collins
    Is there a simple way to place a detail disclosure icon on a UIButton? I'm using a navigation controller and I want a button press to push a new view on the stack, so I thought a detail disclosure icon would be appropriate, but I haven't found a straightforward way to do that yet.

    Read the article

  • Setting Position of source and listener has no effect

    - by Ben E
    Hi Guys, First time i've worked with OpenAL, and for the life of my i can't figure out why setting the position of the source doesn't have any effect on the sound. The sounds are in stero format, i've made sure i set the listener position, the sound is not realtive to the listener and OpenAL isn't giving out any error. Can anyone shed some light? Create Audio device ALenum result; mDevice = alcOpenDevice(NULL); if((result = alGetError()) != AL_NO_ERROR) { std::cerr << "Failed to create Device. " << GetALError(result) << std::endl; return; } mContext = alcCreateContext(mDevice, NULL); if((result = alGetError()) != AL_NO_ERROR) { std::cerr << "Failed to create Context. " << GetALError(result) << std::endl; return; } alcMakeContextCurrent(mContext); SoundListener::SetListenerPosition(0.0f, 0.0f, 0.0f); SoundListener::SetListenerOrientation(0.0f, 0.0f, -1.0f); The two listener functions call alListener3f(AL_POSITION, x, y, z); Real vec[6] = {x, y, z, 0.0f, 1.0f, 0.0f}; alListenerfv(AL_ORIENTATION, vec); I set the sources position to 1,0,0 which should be to the right of the listener but it has no effect alSource3f(mSourceHandle, AL_POSITION, x, y, z); Any guidance would be much appreciated

    Read the article

  • How do I set a dependency on Spring Web Services in my POM.xml

    - by Ben
    I get this on a lot of Maven dependencies, though current source of pain is Spring. I'll set a Spring version and include it like so: <spring-version>3.0.0.RELEASE</spring-version> <!-- Spring framework --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring-version}</version> </dependency> Which works as expected. I am however having problems setting my dependency on spring-ws-core for web services. The latest I can find in any repo is 2.0.0-M1. http://mvnrepository.com/artifact/org.springframework.ws/spring-ws-core Any clues on what I need to include in my maven POM to get Spring 3 web services to work :)

    Read the article

  • Difference between dates

    - by Ben C
    I want to calculate the difference between two times, one of which is the current time, and the other is just in the format HH:MM, always in the future. If I just subtract $futuretime from $now, it should, of course, be a positive number. This works fine until... If $now is in the afternoon or evening and $futuretime is, say, 7AM next morning, how can I force it to understand the the time is always going to be in the future? (It's for working out the time of something that occurs about every half an hour during working hours, and then stops until the following morning) Thanks in advance!

    Read the article

  • How to merge jquery autocomplete and fcbkListSelection functionality?

    - by Ben
    Initial caveat: I am a newbie to jquery and javascript. I started using the autocomplete jquery plugin recently from bassistance.de. Yesterday, I found the fcbkListSelection plugin (http://www.emposha.com/javascript/fcbklistselection-like-facebook-friends-selector.html) and am using it to include a selector in my application. What I now want to do is to merge the 2 pieces of functionality since there are lots of items in my selector list. To be more specific, I want to put a "Filter by Name" text box above the facebook list selection object in my html. When the user types a few characters into the "Filter by Name" text box, I want the items in the Facebook list selector to only show the items that contain the typed characters -- kind of like what autocomplete does already, but rather than the results showing below the text input box, I want them to dynamically update the facebook list object. Is this possible and relatively straightforward? If so, can somebody please describe how to do it? If not, is there an easier way to approach this? Thanks! OK, to Spencer Ruport's comment, I guess I may have a more specific question already. Below is the current Javascript in my HTML file (angle brackets represent Django tags). #suggest1 and #fcbklist both do their separate pieces, but how do I get them to talk to each other? Do I need to further write javascript in my HTML file, or do I need to customize the guts of the plugins' .js? Does this help elaborate? $(document).ready(function() { var names = []; var count = 0; {% for a, b, c in friends_for_picker %} names[count] = "{{ b }}"; count = count+1; {% endfor %} function findValueCallback(event, data, formatted) { $("<li>").html( !data ? "No match!" : "Selected: " + formatted).appendTo("#result"); } function formatItem(row) { return row[0] + " (<strong>id: " + row[1] + "</strong>)"; } function formatResult(row) { return row[0].replace(/(<.+?>)/gi, ''); } $("#suggest1").autocomplete(names, { multiple: true, mustMatch: false, autoFill: true, matchContains: true, }); //id(ul id),width,height(element height),row(elements in row) $.fcbkListSelection("#fcbklist","575","50","4"); });

    Read the article

  • OO Design / Patterns - Fat Model Vs Transaction Script?

    - by ben
    Ok, 'Fat' Model and Transaction Script both solve design problems associated with where to keep business logic. I've done some research and popular thought says having all business logic encapsulated within the model is the way to go (mainly since Transaction Script can become really complex and often results in code duplication). However, how does this work if I want to use the TDG of a second Model in my business logic? Surely Transaction Script presents a neater, less coupled solution than using one Model inside the business logic of another? A practical example... I have two classes: User & Alert. When pushing User instances to the database (eg, creating new user accounts), there is a business rule that requires inserting some default Alerts records too (eg, a default 'welcome to the system' message etc). I see two options here: 1) Add this rule as a User method, and in the process create a dependency between User and Alert (or, at least, Alert's Table Data Gateway). 2) Use a Transaction Script, which avoids the dependency between models. (Also, means the business logic is kept in a 'neutral' class & easily accessible by Alert. That probably isn't too important here, though). User takes responsibility for it's own validation etc, however, but because we're talking about a business rule involving two Models, Transaction Script seems like a better choice to me. Anyone spot flaws with this approach?

    Read the article

  • something wrong in my program by using GData xmlsupport

    - by ben
    Ld build/Debug-iphonesimulator/newParser.app/newParser normal i386 cd /Users/apple/Desktop/newParser setenv MACOSX_DEPLOYMENT_TARGET 10.5 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk -L/Users/apple/Desktop/newParser/build/Debug-iphonesimulator -F/Users/apple/Desktop/newParser/build/Debug-iphonesimulator -filelist /Users/apple/Desktop/newParser/build/newParser.build/Debug-iphonesimulator/newParser.build/Objects-normal/i386/newParser.LinkFileList -mmacosx-version-min=10.5 -lxml2 -framework Foundation -framework UIKit -framework CoreGraphics -o /Users/apple/Desktop/newParser/build/Debug-iphonesimulator/newParser.app/newParser Undefined symbols: "_kGDataXMLXPathDefaultNamespacePrefix", referenced from: _kGDataXMLXPathDefaultNamespacePrefix$non_lazy_ptr in GDataXMLNode.o (maybe you meant: _kGDataXMLXPathDefaultNamespacePrefix$non_lazy_ptr) ld: symbol(s) not found collect2: ld returned 1 exit status

    Read the article

  • Sql Server Maintenance Plan Tasks & Completion

    - by Ben
    Hi All, I have a maintenance plan that looks like this... Client 1 Import Data (Success) -> Process Data (Success) -> Post Process (Completion) -> Next Client Client 2 Import Data (Success) -> Process Data (Success) -> Post Process (Completion) -> Next Client Client N ... Import Data and Process Data are calling jobs and Post Process is an Execute Sql task. If Import Data or Process Data Fail, it goes to the next client Import Data... Both Import Data and Process Data are jobs that contain SSIS packages that are using the built-in SQL logging provider. My expectation with the configuration as it stands is: Client 1 Import Data Runs: Failure - Client 2 Import Data | Success Process Data Process Data Runs: Failure - Client 2 Import Data | Success Post Process Post Process Runs: Completion - Success or Failure - Next Client Import Data This isn't what I'm seeing in my logs though... I see several Client Import Data SSIS log entries, then several Post Process log entries, then back to Client Import Data! Arg!! What am I doing wrong? I didn't think the "success" piece of Client 1 Import Data would kick off until it... well... succeeded aka finished! The logs seem to indicate otherwise though... I really need these tasks to be consecutive not concurrent. Is this possible? Thanks!

    Read the article

  • How do bind a List<object> to a DataGrid in Silverlight?

    - by Ben McCormack
    I'm trying to create a simple Silverlight application that involves parsing a CSV file and displaying the results in a DataGrid. I've configured my application to parse the CSV file to return a List<CSVTransaction> that contains properties with names: Date, Payee, Category, Memo, Inflow, Outflow. The user clicks a button to select a file to parse, at which point I want the DataGrid object to be populated. I'm thinking I want to use data binding, but I can't seem to figure out how to get the data to show up in the grid. My XAML for the DataGrid looks like this: <data:DataGrid IsEnabled="False" x:Name="TransactionsPreview"> <data:DataGrid.Columns> <data:DataGridTextColumn Header="Date" Binding="{Binding Date}" /> <data:DataGridTextColumn Header="Payee" Binding="{Binding Payee}"/> <data:DataGridTextColumn Header="Category" Binding="{Binding Category}"/> <data:DataGridTextColumn Header="Memo" Binding="{Binding Memo}"/> <data:DataGridTextColumn Header="Inflow" Binding="{Binding Inflow}"/> <data:DataGridTextColumn Header="Outflow" Binding="{Binding Outflow}"/> </data:DataGrid.Columns> </data:DataGrid> The code-behind for the xaml.cs file looks like this: private void OpenCsvFile_Click(object sender, RoutedEventArgs e) { try { CsvTransObject csvTO = new CsvTransObject.ParseCSV(); //This returns a List<CsvTransaction> and passes it //to a method which is supposed to set the DataContext //for the DataGrid to be equal to the list. BindCsvTransactions(csvTO.CsvTransactions); TransactionsPreview.IsEnabled = true; MessageBox.Show("The CSV file has a valid header and has been loaded successfully."); } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void BindCsvTransactions(List<CsvTransaction> listYct) { TransactionsPreview.DataContext = listYct; } My thinking is to bind the CsvTransaction properties to each DataGridTextColumn in the XAML and then set the DataContext for the DataGrid to the List<CsvTransaction at run-time, but this isn't working. Any ideas about how I might approach this (or do it better)?

    Read the article

  • Strange for loop

    - by Ben Baraga
    Hello! I was looking though a fellow developers code when I saw this .. for (;;){ .... .... .... } I have never seen ";;" used in a loop. What does this do exactly?

    Read the article

  • Best practice for copying private instance vars with NSCopying

    - by Ben
    I might be missing something obvious here, but I'm implementing NSCopying on one of my objects. That object has private instance variables that are not exposed via getters, as they shouldn't be used outside the object. In my implementation of copyWithZone:, I need alloc/init the new instance, but also set up its state to match the current instance. I can obviously access current private state from inside copyWithZone:, but I can't set it into the new object, because there are no accessors for that state. Is there a standard way around this while still keeping data privacy intact? Thanks.

    Read the article

  • Change sort arrow position in flex grid

    - by Ben
    Currently when sorting in a flex grid, the sort arrow that shows whether the column is sorted ascending or descending is right aligned to the column. Is there anyway to change the position of the sort arrow, such as applying padding?

    Read the article

  • Good source for studying professional software development with Visual Studio 2010?

    - by Ben
    I spent a lot of time reading blogs and tutorials on the Net regarding how to do this and that with VS2010, but I thought it would be better to learn it in a more systematic way. Do you know of a good website/book that will teach me how to use Visual Studio 2010/2008 Team System + Microsoft Project to perform various tasks from Project Management to code development and testing in the way the software was designed for? Thank you.

    Read the article

  • Regex for multi-line HTML comments (preg_match_all)

    - by Ben
    I have an html document with multiple commented-out PHP arrays, e.g.: <!-- Array ( [key] => 0 ) --> Using PHP, I need to somehow parse the HTML for only these comments (there are other comments that will need to be ignored) and extract the contents. I've been trying to use preg_match_all but my regex skills aren't up to much. Could anyone point me in the right direction? Any help is much appreciated!

    Read the article

  • How do I retrieve the zero-based index of the selected option in a select box?

    - by Ben McCormack
    Let's say I have the following in my HTML code: <select name="Currency" id="Currency"> <option value="0.85">Euro</option> <option value="110.33">Japanese Yen</option> <option value="1.2">Canadian Dollars</option> </select> Using jQuery, I can use $("#Currency").val() to give me the selectd value, and I can use $("#Currency :selected").text() to get the selected text. What do I need to do to get the zero-based index (in this case, 0, 1, or 2) of the current selection?

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >