Daily Archives

Articles indexed Wednesday May 26 2010

Page 2/118 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to make Asynchronous(AJAX) File Upload using iframe ?

    - by BugKiller
    Hi, I'm trying to make ajax file upload . I read that it is not possible to do that without using iframe . I wrote : <iframe id="uploadTrg" name="uploadTrg" height="0" width="0" frameborder="0" scrolling="yes"></iframe> <form id="myForm" action="file-component" method="post" enctype="multipart/form-data" target="uploadTrg"> File: <input type="file" name="file"> <input type="submit" value="Submit" id="submitBtn"/> </form> and using jquery form plugin : $('#myForm').ajaxForm({ dataType: 'json', success: function(data){ alert(data.toSource()); } }); The Result : the file is uploaded successfully and I can see the uploaded file , but a dialog box appears : since I send back a json result to display the file name + size etc .. My Question : How can I use the iFrame to be able to make " ajax file upload".

    Read the article

  • How to pass array element one by one in text box in php

    - by trainee
    i am Reading the file contents and passed it in explod function("=",$string) ,it gives me two array parts[0].parts[1] seprated by = .parts[1] array displays all the values of the variable .now how can i use these values one by one to pass in the text box .The variable value comes in this way (value1 value2 value3 value4...) my code also throws the undefined offset :1 notice when i prints the parts[1]arrray

    Read the article

  • Backwards compatibility when using Core Data

    - by Alex
    Could anybody shed some light as to why is my app crashing with the following error on iPhone OS 2.2.1 dyld: Symbol not found: _OBJC_CLASS_$_NSPredicate Referenced from: /var/mobile/Applications/456F243F-468A-4969-9BB7-A4DF993AE89C/AppName.app/AppName Expected in: /System/Library/Frameworks/Foundation.framework/Foundation I have weak linked CoreData.framework, and have the Base SDK set to 3.0 and Deployment Target set to SDK 2.2 The app already uses other 3.0 features when available and I did not have any problems with those. But apparently the backward-compatibility methods used for other features do not work with Core Data. The app crashes before app delegate's applicationDidFinishLaunching gets called. Here's the debugger log: [Session started at 2010-05-25 20:17:03 -0400.] GNU gdb 6.3.50-20050815 (Apple version gdb-1119) (Thu May 14 05:35:37 UTC 2009) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys001 Loading program into debugger… sharedlibrary apply-load-rules all warning: Unable to read symbols from "MessageUI" (not yet mapped into memory). warning: Unable to read symbols from "CoreData" (not yet mapped into memory). Program loaded. target remote-mobile /tmp/.XcodeGDBRemote-12038-42 Switching to remote-macosx protocol mem 0x1000 0x3fffffff cache mem 0x40000000 0xffffffff none mem 0x00000000 0x0fff none run Running… [Switching to thread 10755] [Switching to thread 10755] Re-enabling shared library breakpoint 1 Re-enabling shared library breakpoint 2 Re-enabling shared library breakpoint 3 Re-enabling shared library breakpoint 4 Re-enabling shared library breakpoint 5 (gdb) continue warning: Unable to read symbols for ""/Users/alex/iPhone Projects/AppName/build/Debug-iphoneos"/AppName.app/AppName" (file not found). dyld: Symbol not found: _OBJC_CLASS_$_NSPredicate Referenced from: /var/mobile/Applications/456F243F-468A-4969-9BB7-A4DF993AE89C/AppName.app/AppName Expected in: /System/Library/Frameworks/Foundation.framework/Foundation (gdb)

    Read the article

  • Has anybody developed an auto part ecommerce site?

    - by Sam Kong
    Hi, I need to develop an e-Commerce site that sells auto parts. For that, I need a database that has year/make/model information that each part is applicable to. As far as I know, we need to purchase the database and subscribe updates. Is there any database available for free? (I may not need updates) Thanks. Sam

    Read the article

  • How to set maxLines and ellipsesize of a TextView at the same time.

    - by michael
    I want to limit my text view to have maximum of 6 lines, so I did: <TextView android:id="@+id/toptext" android:layout_width="fill_parent" android:layout_height="wrap_content" android:maxLines="6"/> But when I try to configure it to add '...' when the text is truncated, I add android:ellipsize="end". I do see the ... but then my TextView only has a max line of 2, instead of 6. Can you please how can I make the text view of maximum line of 6 and add '...' when it get truncated? Thank you.

    Read the article

  • Is it bad practice to use python's getattr extensively?

    - by Wilduck
    I'm creating a shell-like environment. My original method of handleing user input was to use a dictionary mapping commands (strings) to methods of various classes, making use of the fact that functions are first class objects in python. For flexibility's sake (mostly for parsing commands), I'm thinking of changing my setup such that I'm using getattr(command), to grab the method I need and then passing arguments to it at the end of my parser. Another advantage of this approach is not having to update my (currently statically implemented) command dictionary every time I add a new method/command. My question is, will I be taking a hit to the efficiency of my shell? Does it matter how many methods/commands I have? I'm currently looking at 30 some commands, which could eventually double.

    Read the article

  • Could not locate compojure in classpath

    - by Xian
    I am trying the various Getting started examples and I can get a basic hello world example working with basic HTML in the route as such (ns hello-world (:use compojure.core ring.adapter.jetty) (:require [compojure.route :as route])) (defroutes example (GET "/" [] "<h1>Hello World Wide Web!</h1>")) (run-jetty example {:port 8080}) But when I attempt to use the html helpers like so (ns hello-world (:use compojure ring.adapter.jetty) (:require [compojure.route :as route])) (defroutes example (GET "/" (html [:h1 "Hello World"]))) (run-jetty example {:port 8080}) Then I get the following error [null] Exception in thread "main" java.io.FileNotFoundException: Could not locate compojure__init.class or compojure.clj on classpath: (core.clj:1)

    Read the article

  • Oauth and Jtwitter

    - by Jay
    I am trying to use Oauth with jTwitter.. and get an exception while creating the Oauth signpostclient String JTWITTER_OAUTH_KEY="GDdmIQH6jhtmLUypg82g"; String JTWITTER_OAUTH_SECRET="9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8"; OAuthSignpostClient client = new OAuthSignpostClient(JTWITTER_OAUTH_KEY, JTWITTER_OAUTH_SECRET,"oob"); throws the following exception Exception in thread "main" java.lang.NoSuchMethodError: oauth.signpost.AbstractOAuthConsumer.(Ljava/lang/String;Ljava/lang/String;)V at winterwell.jtwitter.OAuthSignpostClient$2.(OAuthSignpostClient.java:182) at winterwell.jtwitter.OAuthSignpostClient.init(OAuthSignpostClient.java:182) at winterwell.jtwitter.OAuthSignpostClient.(OAuthSignpostClient.java:144) at jay.twitter.HelloTwitter.main(HelloTwitter.java:16) What am I doing wrong? Can anyone help pls.

    Read the article

  • Are there any online payment services simliar to paypal that do not require customers to setup accou

    - by shady
    I'm integrating PayPal on a client's site and they are not happy with the fact that their customers would have to sign up for an account before they can make a purchase. They like the price of PayPal, but don't really like the interface. Could I offer them an alternative service to PayPal that would allow me to setup a checkout page directly on their website and not require their users to create accounts?

    Read the article

  • Established Web Site For Sale - Why Not For Rent?

    Getting an established web site for sale is definitely a smart thing to do, because this sort of site has nice, stable traffic and this traffic can be easily verified for its quality. Based on the monthly traffic value of your site, or also based on income that it currently produces.

    Read the article

  • Will php code exit after echo for ajax?

    - by Steve
    I am running a typical php-engined ajax webpage. I use echo to return a html string from the php code. My question is, if I have some other code after the echo, will those code get executed? Or echo behaves similar to exit, which immediately return and stop running the php code? Thanks.

    Read the article

  • Multiple Default Routes in ASP.NET MVC to different Default Actions

    - by Alex
    I have multiple controllers with different actions (no "Index" actions). The actions I consider "default" actions, are named differently. I want to create default routes for their names and have the first available action (from my list of default actions) executed if only the controller name is provided in the route. So, for example, I have the following actions which I want to consider default and want checked for their existence in a controller in this order: List() Draw() ViewSingle() The routing should somehow search for /{controller} and then take the first available action from the list above as default action, e.g.: /ControllerA -> ControllerA.List() /ControllerB -> ControllerB.Draw() /ControllerC -> ControllerC.ViewSingle() /ControllerD -> ControllerD.Draw() /ControllerE -> ControllerE.List() Is this possible? I tried creating additional Default actions like this but couldn't get it to work: routes.MapRoute("Default1", "{controller}/{action}", new { controller = UrlParameter.Optional, action = "List" } routes.MapRoute("Default2", "{controller}/{action}", new { controller = UrlParameter.Optional, action = "Draw" } routes.MapRoute("Default3", "{controller}/{action}", new { controller = UrlParameter.Optional, action = "ViewSingle" } Help?

    Read the article

  • Best way to simplify this code, more efficient

    - by Derek
    My question is, is there a way to make this code more efficient or write it in a simple way? javascript by the way. switch (tempvar1) { case 1: currentSlide = 'slide1'; showaslide('ppslide1'); break; case 2: currentSlide = 'slide2'; showaslide('ppslide2'); break; case 3: currentSlide = 'slide3'; showaslide('ppslide3'); break; case 4: currentSlide = 'slide4'; showaslide('ppslide4'); break; case 5: currentSlide = 'slide5'; showaslide('ppslide5'); break; case 6: currentSlide = 'slide6'; showaslide('ppslide6'); break; // 20 total cases }

    Read the article

  • CSS: Freeze table header and first column, *but only on certain axes*

    - by Mega Matt
    Hello all, I have a variation on a common question, and I'll try to explain it as best I can. It may take some visualization on your part. I have an HTML table (in reality there are tables within tables within divs within tables -- I'm using the JSGantt plugin). I'd like for the table header to be frozen only when I scroll down on the y-axis, but if I need to scroll right to see more data, I would like it to scroll right. Meanwhile, as I scroll down (with the header row staying put), I'd like the first column of the table to scroll down with me. But when I scroll right, I want the first column to stay put (but as I mentioned above, the header row to scroll with me). So essentially I've frozen the first column only on the x-axis and the header row only on the y-axis. I'll stop there for now. If anyone needs more clarification I can try to explain. I've tried this multiple ways, but I'm convinced that it may not be possible without some serious javascript. The table, by the way, is contained within an outer div with set dimensions, hence the need for me to scroll the data. Any help you can provide would be greatly appeciated. Thanks very much.

    Read the article

  • Put MFC CDialog in a WPF form

    - by splintor
    Hi, We are porting an MFC application to WPF, and will probably won't have time to port the entire application. The MFC app has many CDialog-based windows, and we are thinking of leaving some of these windows in MFC, and show them inside a WPF window, so we can control their modality from WPF. Is there an easy way to accomplish that? If not, can you recommend another way to handle this? thanks, splintor

    Read the article

  • How to keep iPhone app out of iPad store?

    - by Eric
    I have an iPhone app that I have started to turn into a universal app, however the process is not complete and I want to release an update to the iPhone version. I know that you can specify device capabilities in the Info.plist file to restrict your app to certain devices, but how can I do this to prevent the unfinished universal version from appearing in the iPad store? Is checking the LSRequiresiPhoneOS BOOL entry (in the Info.plist file) enough? Thanks!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >