Search Results

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

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

  • Solution to combine two submit buttons.. doing two different things from the same input

    - by zac
    I am trying to figure out how to combine two different forms, both require the same input but they do two different things. One form sends a request to the ecommerce platform to get the order status, and another form takes the same order number and returns a tracking code from USP or USPS. I am looking for some guidance on how I could combine these two actions.. one is currently using the POST method and the other GET. Here is an example .. so one is This one runs a validation script to confirm the order number is valid and then returns the order info if it is the second form is sending a get request to an asp file that is generating the proper tracking numbers. Can someone please point me to how I could begin to tackle this?

    Read the article

  • POST data disapearing on large file upload

    - by DfKimera
    I'm having issues with a file uploading utility in my PHP application. When sending large files (9MB+) over the form, I get a very odd behaviour: the POST data I've included in the form dissapears, including the file information. I've already increased all PHP limits I could (time limit, max input time, post max size, memory limit and upload max filesize) and I still can't get the proper behaviour. I've tried replacing the regular HTTP forms with a Flash-based solution (SWFUpload, www.swfupload.org), still the same behaviour. I've tried multiple files of similar sizes and its definitely not a particular file issue. I've debugged the POST vars sent using Firebug, and the correct variables are still there in the header, together with the file. What could be going on here?

    Read the article

  • Dynamically sized panels

    - by codemnky
    I have a dynamically created tabpage for windows forms. the tabpage is split into two horizontal panels. The top panel should be able to hold up to 4 textboxes like this TextBox1 TextBox2 TextBox3 TextBox4 There WILL be atleast one TextBox. Maximum is 4. How do I create a TabPage with two panels where the top panel only takes up the real estate as needed(i.e only use up the real estate for one textbox or 2 textboxes, or 3 textboxes or the maximum 4 textboxes) and the rest of the tabpage is available for Panel2.

    Read the article

  • On activate does not fire with my Modal/Pop-Up form to Requery

    - by Odesmere
    I have a modal/pop-up form frmEditContact open on this form there is a combo box full of addressescmbAddressList, populated by a query. when the user wants to add an address that doesn't exist there is a button that opens the frmAddress where they may add an address. frmAddress allows them to enter an address to the list and gives the option to save, or cancel (both actions close the form after). with this form closed, the focus is now again on frmEditContact I would like to repopulate the combo box using docmd.Requery cmbAddressList after they close the other form I'm not sure where to handle this, I've tried On Avtivate, On Load, On Update, On Open, On Focus...but none of them fire as I keep the frmEditContact open when they are using the other form is there a way to keep frmEditContact open the whole time, but still an action Event that will fire so that I can Requery? And does On Activate not work with modal forms?

    Read the article

  • What would you use for auto completion in Rails app?

    - by Andrei
    I want to use auto-completion in a number of fields (5-7) in my forms. There is a screencast on auto-completion with Prototype library by Ryan Bates ( http://railscasts.com/episodes/102-auto-complete-association). On the other hand, I have noticed that quite many guys suggest jQuery for this task ( http://jquery.bassistance.de/autocomplete/demo/). And I guess, there was probably some development last year(s), so I ask you - what would you use nowadays to auto-complete your form fields and why? BTW, I still have an open question on auto completion for HABTM association: http://stackoverflow.com/questions/1510935/how-to-do-habtm-management-with-auto-completion-in-rails

    Read the article

  • Errors in Decimal Calcs within def clean method?

    - by allanhenderson
    I'm attempting a few simple calculations in a def clean method following validation (basically spitting out a euro conversion of retrieved uk product price on the fly). I keep getting a TypeError. Full error reads: Cannot convert {'product': , 'invoice': , 'order_discount': Decimal("0.00"), 'order_price': {...}, 'order_adjust': None, 'order_value': None, 'DELETE': False, 'id': 92, 'quantity': 8} to Decimal so I guess django is passing through the entire cleaned_data form to Decimal method. Not sure where I'm going wrong - the code I'm working with is: def clean_order_price(self): cleaned_data = self.cleaned_data data = self.data order_price = cleaned_data.get("order_price") if not order_price: try: existing_price = ProductCostPrice.objects.get(supplier=data['supplier'], product_id=cleaned_data['product'], is_latest=True) except ProductCostPrice.DoesNotExist: existing_price = None if not existing_price: raise forms.ValidationError('No match found, please enter new price') else: if data['invoice_type'] == 1: return existing_price.cost_price_gross elif data['invoice_type'] == 2: exchange = EuroExchangeRate.objects.latest('exchange_date') calc = exchange.exchange_rate * float(existing_price.cost_price_gross) calc = Decimal(str(calc)) return calc return cleaned_data If the invoice is of type 2 (a euro invoice) then the system should grab the latest exchange rate and apply that to the matching UK pound price pulled through to get euro result. Should performing a decimal conversion be a problem within def clean method? Thanks

    Read the article

  • How do I submit a form using jquery (ajaxForm plugin) to an external site but not reload to a differ

    - by Scott
    Hi, I'm trying to create a form that sends the customer's name and email address to icontact (an email list application). All the values are correct for icontact and if I submit the form as usual, icontact responds that it added the email address. The success message loads in a new page from icontact's website. What I'd like to accomplish is that ajax would send the form and returns a success message within the current page, without sending the customer to a new page. Here is the test page: http://www.skhot.com/test/js-test/forms/index.php

    Read the article

  • Assigning a previous fieldvalue to a field in the next record

    - by user2945849
    I am working on a loan amortization schedule using Access, I have created the following tables: tblMembers - autoMemberID|txtLN|txtFN|etc tblLoans - autoLoanID|numMemberID|etc tblSchedules -autoScheduleID|numLoanID|numPayment#|datDue|dblBegin|...|dblEnd tblPayments - autoPaymID|numLoanID|curAmtPaid|datPaidDate and forms: frmLoans - autoLoanID|etc sbfSchedules - numPaymID|datDue|dblBegin|...|dblEnd sbfPayments - dblAmount|datPaid I have been able to generate the schedule (using DAO recordset) clicking a btnRepaymentSchedule the challenge is when I click a btnAddPayment still on the sbfSchedules, I want the value of the dblEnd field to be the value of the next record dblBegin field! I have tried using dlookup(txtBeginBalance = Dlookup("EndBalance", _ "Schedules","[ScheduleID] = Form![Schedules]![ScheduleID]-1) but there is no effect but if I use txtBeginBalance = txtEndBalance the value of txtEndBalance is assigned to the value of txtBeginBalance of the same record (want next record). Secondly, how can I set focus to the next record if a contro(txtAmountPaid) is not null on clicking the btnAddPayment or assigning the value of a calculation when the control is 0 or null ? Thanks

    Read the article

  • Form authentication works on dev server but not on IIS

    - by Ilknur
    Hi, We have a similar problem. We have a web application running under default appdomain. It was working fine until a week before...Suddenly it has encountered a problem. Below message is taken from event logs. Event code: 4005 Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired. Application uses FormsAuthentication and gets the roles from aspnetdb.. After the error, when user logins to the page, it does not redirects to the default.aspx. Again login.aspx comes up. On the other hand application works fine on development server(localhost), but not on www(IIS 6.0). Does any one has an idea? Thanks, Ilknur

    Read the article

  • how to do server side form validation for dynamic inputs with Django

    - by Satoru.Logic
    Hi, all. I am using django.forms.Form to validate form data in a survey applications. In a survey-creating form, a user can submit multiple questions that belong to the survey being created. Names for the question inputs are in the form of 'question_seq' , where seq is maintained using Javascript. Back in the server side, my code doesn't know before hand how many such questions will be submitted. Is there any way to do this with Django form so that the form can automatically recognizes the questions and validate them?

    Read the article

  • updating button text and other issues

    - by droidus
    I am trying to update my button. but the problem is that I can't have an ID/name with it, right, when doing this? so what if I have multiple forms on the page, and must identify the button? <input type="submit" value="Upload my File" style="background-color:#00F; font-size:14px; padding:1em;" onclick=" this.value='Please wait...'; this.disabled = true; var theForm = this.form; window.setTimeout(function(){theForm.submit();},3);" /> also, the button doesn't seem to wait 3 seconds when I hit the submit button.

    Read the article

  • Best approach to store login credentials for website

    - by Zerotoinfinite
    I have created a site in ASP.NET 3.5 & I have only 2 or 3 user login IDs who can login to the website. What would be the best way to save these login details? Which of these approaches, or others, would be most suitable? Using Forms Authentication, and saving credentials (username and password) in web.config to create a text file in directory and modify it Which approach is best from a security and maintenance perspective? What other approaches are suitable for a login system for ASP.NET?

    Read the article

  • PHP: form input field names containing square brackets like field[index]

    - by gidireich
    Hi, I've seen lot of code that handle forms, which creates input fields with names containing square brackets. I understand that this is being somehow converted to PHP arrays when a PHP script examines the $_POST variable. My questions about this: What is the mechanism behind? At which point this names that merely contain brackets are converted to arrays? Is this a feature of the HTPP protocol? Of web servers? Of the PHP language? Continuing the previous question, is this a commonly used hack or a normal programming tool? What are (all) the rules of using brackets in input field names? Can multidimensional arrays be created this way? Thanks, Gidi

    Read the article

  • Automatic form generation software

    - by Jonathan
    Hi! I'm using winforms. I spend a lot of time drawing forms (maybe not a lot, but it is a boring task). To sum up... I want to develop a simple aplication that connect to a sql server database, let the user to select a table, and put the controls in a form for me (generate the designer code), based on the tipe of each column. Then my app will name each control like the column of the table, set the maxlengh property (if the type is varchar), and create a label with the same text near the control. If the column is a FK, then the app will draw a combobox and so on. I saw that Telerik Open ORM make something like this, but I only need a simple app for the IU Generation. If the same day I finish my little application I discover a tool that make the same... I will feel myself stupid :D Are there any tool out there that do this work for me? Thanks

    Read the article

  • Simple Thread Programming

    - by mike
    I have started to play with threads in c#, but need now help, here is my code: public partial class Form1 : Form { public Form1() { InitializeComponent(); DoCount(); } public void DoCount() { for (int i = 0; i < 100; i++) { objTextBox.Text = i.ToString(); Thread.Sleep(100); } } } its a simple win forms with a textbox, i want to see the "counting", but as you see in my code, the textbox shows me 99, it count till 99 and then shows up.. i`ll think, i have to manage this in a new thread but dont know how!

    Read the article

  • Best practice: Define form field name in backend or the template

    - by AbcAeffchen
    If you designing a webpage you should separate the backend from the frontend. But if you use forms you have to name them. But where should you set this name? e.g. PHP: $fieldName = 'email'; $template->setVar('field_name', $fieldName) ... if(!empty($_POST)) validate($_POST[$fieldName]); Template: <input type="text" name="{$field_name}"> Or just PHP: if(!empty($_POST)) validate($_POST['email']); Template: <input type="text" name="email"> Or should I write a function that can be called from the template an converts an array of field data (name, type, value, id, class, ...) into html code? Is there a best practice where to define fieldnames (types,etc.)? Notice: I used php and smarty like pseudocode (and tags), but its a general question.

    Read the article

  • Best place to create windows form objects

    - by user333484
    I'm creating a windows app in c# 2008 that will have around 8-10 dialog boxes. I want these forms to exist throughout the life of the program. Where's the best place to create and store the objects? I'm coming from Delphi, where Form objects were usually stored in global variables. I'm tempted to do it in the static Program class. Should I put them in the main form instead? Thanks for helping a C# newb out.

    Read the article

  • How to use Joomla to allow users to create/update data on my site?

    - by gromo
    Right now Im using an extension called chronoforms but Im open to anything that works. I can make forms just fine, and it saves the submitted data to a table. Where I am stuck is, how do I then allow my front end users who filled out and submitted the form to go back, view their old answers, change them, and resubmit them or resave them. In order to do this I think I would need to be able to retrieve their last answers from the table on which it is stored, replug the last specific data record for that user only back into the original form on the front end and let the user change and resubmit it? Unless there is a better way to allow the user to change their answers to a form and resave them? If anyone knows how to do this, or if there is a better way I should be going about doing this, (perhaps there is another extension that handles this kind of thing) please let me know. Thanks!

    Read the article

  • Django one form for two models

    - by martinthenext
    Hello! I have a ForeignKey relationship between TextPage and Paragraph and my goal is to make front-end TextPage creating/editing form as if it was in ModelAdmin with 'inlines': several field for the TextPage and then a couple of Paragraph instances stacked inline. The problem is that i have no idea about how to validate and save that: @login_required def textpage_add(request): profile = request.user.profile_set.all()[0] if not (profile.is_admin() or profile.is_editor()): raise Http404 PageFormSet = inlineformset_factory(TextPage, Paragraph, extra=5) if request.POST: try: textpageform = TextPageForm(request.POST) # formset = PageFormSet(request.POST) except forms.ValidationError as error: textpageform = TextPageForm() formset = PageFormSet() return render_to_response('textpages/manage.html', { 'formset' : formset, 'textpageform' : textpageform, 'error' : str(error), }, context_instance=RequestContext(request)) # Saving data if textpageform.is_valid() and formset.is_valid(): textpageform.save() formset.save() return HttpResponseRedirect(reverse(consults)) else: textpageform = TextPageForm() formset = PageFormSet() return render_to_response('textpages/manage.html', { 'formset' : formset, 'textpageform' : textpageform, }, context_instance=RequestContext(request)) I know I't a kind of code-monkey style to post code that you don't even expect to work but I wanted to show what I'm trying to accomplish. Here is the relevant part of models.py: class TextPage(models.Model): title = models.CharField(max_length=100) page_sub_category = models.ForeignKey(PageSubCategory, blank=True, null=True) def __unicode__(self): return self.title class Paragraph(models.Model): article = models.ForeignKey(TextPage) title = models.CharField(max_length=100, blank=True, null=True) text = models.TextField(blank=True, null=True) def __unicode__(self): return self.title Any help would be appreciated. Thanks!

    Read the article

  • Please help with my JSP Internationalization problem

    - by wokena
    I have problem with I18N in JSP, specifically, with forms. When I enter some Czech characters (e.g., "ešcržýá...") into my page one form, into the field "fieldOne", and then show text from that field on page two, instead of Czech characters I see this as "čč". (Note, the second page gets the Czech characters with "request.getProperty("fieldOne")") Here is the source code: Page one: <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %> <html> <head></head> <body> <form action="druha.jsp" method="post"> <input type="textarea" name="fieldOne"> <input type="submit"> </form> </body> </html> Page two: <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %> <html> <head></head> <body> <h1>The text: </h1> <%=request.getProperty("fieldOne")%> </body> </html> Thanks for help...

    Read the article

  • Creating a Custom Design-Time Environment

    - by Charlie
    Hello all, My question is related to the design-time support of WPF. From MSDN I read, The WPF Designer provides a framework and a public API which you can use to implement custom adorners, tools, property editors, and designers. But the vast majority of the examples I have found are trivial, and do not illustrate much concerning the creation of a customized designer in an existing WPF application. We have migrated our application from Windows Forms to WPF over the past year, and the next step will be to take an existing WinForms Panel designer, and rewrite it in WPF. Suffice it to say that this will be a huge project. But I don't even know where to begin. I am wondering if any of you have had similar experiences writing a customized designer for a WPF application, and what it was like. Even better, if you could compare and contrast the functionality between the WinForms designer and the WPF designer, or explain the transition from the former to the latter, that would be helpful. If you know of any simple examples that demonstrate a customized design environment (with custom controls, etc.) that would be extremely beneficial. All in all, I am just wondering if many people have undertaken this yet, and what their results have been. EDIT: To clarify, yes, I am talking about hosting a WPF designer. It appears that this may not even be possible, which is a huge setback. Here is a screenshot of our current WinForms designer. As you can see, it is used to create customized user interfaces. You can drag custom controls onto it and design them, then put the panel into a "run mode" in which all of the controls become functional. Short of spending months writing our designer, would this be possible in WPF? What about .NET 4.0 and VS2010? Will those add any designer functionality?

    Read the article

  • undefined method `build_users' with nested models

    - by Cédric
    I've got into trouble with nested attributes. Here is my Account model : class Account < ActiveRecord::Base has_many :products has_many :blogs has_many :openings has_many :users has_one :logo, :class_name => "AccountPicture" has_one :address, :class_name => "AccountAddress" has_and_belongs_to_many :options accepts_nested_attributes_for :logo, :allow_destroy => true accepts_nested_attributes_for :address, :allow_destroy => true accepts_nested_attributes_for :users, :allow_destroy => true end And here is my User model : class User < ActiveRecord::Base belongs_to :account end As you can see, Account accepts nested attributes for logo, address, and users. While testing, i can use nested attributes for logo and address, but not for user. a = Account.new => #<Account id: nil, hostname: nil, subdomain: nil, name: nil, description: nil, base_line: nil, footer: nil, phone_number: nil, mobile_number: nil, email_address: nil, created_at: nil, updated_at: nil> # building the address works fine >> a.build_address => #<AccountAddress id: nil, account_id: nil, country: nil, state: nil, county: nil, city: nil, suburb: nil, zipcode: nil, street: nil, streetno: nil, longitude: nil, latitude: nil, error_code: nil> # building the users fails >> a.build_users NoMethodError: undefined method `build_users' for #<Account:0x7f6862a5f948> from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:260:in `method_missing' from (irb):2 Thus, in my views, when i use the nested forms, i got this error back : User(#69850615730460) expected, got Array(#69850664775200) Any help would be appreciated. Thanks.

    Read the article

  • Manditory read-only fields in django

    - by jamida
    I'm writing a test "grade book" application. The models.py file is shown below. class Student(models.Model): name = models.CharField(max_length=50) parent = models.CharField(max_length=50) def __unicode__(self): return self.name class Grade(models.Model): studentId = models.ForeignKey(Student) finalGrade = models.CharField(max_length=3) I'd like to be able to change the final grade for several students in a modelformset but for now I'm just trying one student at a time. I'm also trying to create a form for it that shows the student name as a field that can not be changed, the only thing that can be changed here is the finalGrade. So I used this trick to make the studentId read-only. class GradeROForm(ModelForm): studentId = forms.ModelChoiceField(queryset=Student.objects.all()) def __init__(self, *args, **kwargs): super(GradeROForm,self).__init__(*args, **kwargs) instance = getattr(self, 'instance', None) if instance and instance.id: self.fields['studentId'].widget.attrs['disabled']='disabled' def clean_studentId(self): instance = getattr(self,'instance',None) if instance: return instance.studentId else: return self.cleaned_data.get('studentId',None) class Meta: model=Grade And here is my view: def modifyGrade(request,student): student = Student.objects.get(name=student) mygrade = Grade.objects.get(studentId=student) if request.method == "POST": myform = GradeROForm(data=request.POST, instance=mygrade) if myform.is_valid(): grade = myform.save() info = "successfully updated %s" % grade.studentId else: myform=GradeROForm(instance=mygrade) return render_to_response('grades/modifyGrade.html',locals()) This displays the form like I expect, but when I hit "submit" I get a form validation error for the student field telling me this field is required. I'm guessing that, since the field is "disabled", the value is not being reported in the POST and for reasons unknown to me the instance isn't being used in its place. I'm a new Django/Python programmer, but quite experienced in other languages. I can't believe I've stumbled upon such a difficult to solve problem in my first significant django app. I figure I must be missing something. Any ideas?

    Read the article

  • JavaScript To Clear Form Field On Submit Before Form Submission To Perl Script

    - by Russell C.
    We have a very long form that has a number of fields and 2 different submit buttons. When a user clicks the 1st submit button ("Photo Search") the form should POST and our script will do a search for matching photos based on what the user entered in the text input ("photo_search_text") next to the 1st submit button and reload the entire form with matching photos added to the form. Upon clicking the 2nd submit button ("Save Changes") at the end of the form, it should POST and our script should update the database with the information the user entered in the form. Unfortunately the layout of the form makes it impossible to separate it into 2 separate forms. I checked the entire form POST and unfortunately the submitted fields are identical to the perl script processing the form submission no matter which submit button is clicked so the perl script can't differentiate which action to perform based on which submit button is pushed. The only thing I can think of is to update the onclick action of the 2nd submit button so it clears the "photo_search_text" field before the form is submitted and then only perform a photo search if that fields has a value. Based on all this, my question is what does the JavaScript look that could clear out the "photo_search_text" field when someone clicks on the 2nd submit button? Here is what I've tried so far none of which has worked successfully: <input type="submit" name="submit" onclick="document.update-form.photo_search_text.value='';" value="Save Changes"> <input type="submit" name="submit" onsubmit="document.update-form.photo_search_text.value='';" value="Save Changes"> <input type="submit" name="submit" onclick="document.getElementById('photo_search_text')='';" value="Save Changes"> We also use JQuery on the site so if there is a way to do this with jQuery instead of plain JavaScript feel free to provide example code for that instead. Lastly, if there is another way to handle this that I'm not thinking of any and all suggestions would be welcome. Thanks in advance for your help!

    Read the article

  • Race condition during thread start?

    - by user296353
    Hi, I'm running the following code to start my threads, but they don't start as intended. For some reason, some of the threads start with the same objects (and some don't even start). If I try to debug, they start just fine (extra delay added by me clicking F10 to step through the code). These are the functions in my forms app: private void startWorkerThreads() { int numThreads = config.getAllItems().Count; int i = 0; foreach (ConfigurationItem tmpItem in config.getAllItems()) { i++; var t = new Thread(() => WorkerThread(tmpItem, i)); t.Start(); //return t; } } private void WorkerThread(ConfigurationItem cfgItem, int mul) { for (int i = 0; i < 100; i++) { Thread.Sleep(10*mul); } this.Invoke((ThreadStart)delegate() { this.textBox1.Text += "Thread " + cfgItem.name + " Complete!\r\n"; this.textBox1.SelectionStart = textBox1.Text.Length; this.textBox1.ScrollToCaret(); }); } Anyone able to help me out? Cheers!

    Read the article

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