Search Results

Search found 19528 results on 782 pages for 'form factor'.

Page 26/782 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • How do you do HTML form testing without real user input simulation ?

    - by justjoe
    this question is like this one, except it's for PHP testing via browser. It's about testing your form input. Right now, i have a form on a single page. It has 12 input boxes. Every time i test the form, i have write those 12 input boxes in my browser. i know it's not a specific coding question. This question is more about how to do direct testing on your form So, how to do recursive testing without consuming too much of your time ?

    Read the article

  • Convert an HTML form field to a JSON object with inner objects.

    - by Tawani
    Given the following HTML form: <form id="myform"> Company: <input type="text" name="Company" value="ACME, INC."/> First Name: <input type="text" name="Contact.FirstName" value="Daffy"/> Last Name: <input type="text" name="Contact.LastName" value="Duck"/> </form> What is the best way serialize this form in javascript to a JSON object in the format: { Company:"ACME, INC.", Contact:{FirstName:"Daffy", LastName:"Duck"} } Also note that there might be more than 1 "." sign in the field name.

    Read the article

  • scripting a google docs form submission

    - by justSteve
    I'm trying to create a bookmarklet that parses a page and sends the results to a googledocs spreadsheet via a form that I've defined. The relevent bit of the script is: var form = document.createElement("form"); form.action = "http://spreadsheets.google.com/formResponse?formkey=Fd0SHgwQ3YwSFd5UHZpM1QxMlNOdlE6MA&ifq"; form.method = "POST"; form.id="ss-form"; form.innerHTML = ["<input id='entry_0' name = 'entry.0.single' value = '" + orderDate + "'/>", "<input name = 'entry.2.single' value = '" + email + "'/>", "<input name = 'entry.3.single' value = '" + customerID + "'/>", ].join(""); form.submit(); alert(form.innerHTML); // returns: Nothing is being saved to the form via the bookmarklet - any way to capture google's response in my bookmarklet's code? (fwiw, i've injected jQuery via jQueryify) EDIT: Firebug's Net panel isn't hearing any of the activity triggered by the bookmarklet - How about i approach this from goolgle's viewform method instead of formresponse. The form i'm trying to submit is located at: http://spreadsheets.google.com/viewform?hl=en&formkey=dFd0SHgwQ3YwSFd5UHZpM1QxMlNOdlE6MA How can I go about injecting the script values into that form and then submitting that - again...via script within the bookmarklet that would have been triggered while on the page being parsed?

    Read the article

  • How to return id of a submitted form using Prototype?

    - by pstinnett
    I have a page that has several ajax submission forms. Each form has a dynamic id assigned to it when it's written to the page. Does anyone know if there is an easy way to return the id of the form that is being submitted? I'm basically looking to click "submit" and alert the id of the submitted form. From there I can use it in the ajax onSuccess function.

    Read the article

  • JQuery Validation Plugin: Prevent validation issue on nested form

    - by Majid
    I have a form on which I use validation. This form has a section for photo upload. Initially this section contains six elements with the following code: <img class="photo_upload" src="image/app/photo_upload.jpg"> I have bound a function to the click event for the class of photo_upload. This function replaces the image with a minimal form with this code: Copy code <form onsubmit="startUploadImage();" target="control_target" enctype="multipart/form-data" method="post" action="index.php"> <input type="hidden" value="add_image" name="service"> <input type="hidden" value="1000000" name="MAX_FILE_SIZE"> <input type="file" size="10" name="photo" id="photo_file_upload"><br> <button onclick="javascript:cancel_photo_upload();return false;">Cancel</button> </form> So, essentially, after the image is clicked, I'd have a new form nested in my original, validated form. Now, when I use this new form and upload an image, I receive an error (repeated three times) saying: validator is undefined http://host.com/path/index.php Line 286 What is going on here? My guess is this Submit event bubbles up to the outer form As we have validation on that form, validation is triggered, Validation tries to find the form triggering it, Since we have not bound validation to the inner form it returns 'undefined' Now, is my assessment correct? Whether it is or not, how can I solve this issue?

    Read the article

  • stats::reorder vs Hmisc::reorder

    - by learnr
    I am trying to get around the strange overlap of stats::reorder vs Hmisc::reorder. Without Hmisc loaded I get the result I want, i.e. an unordered factor: > with(InsectSprays, reorder(spray, count, median)) [1] A A A A A A A A A A A A B B B B B B B B B B B B C C C C C C C C C C C C D D [39] D D D D D D D D D D E E E E E E E E E E E E F F F F F F F F F F F F attr(,"scores") A B C D E F 14.0 16.5 1.5 5.0 3.0 15.0 Levels: C E D A F B Now after loading Hmisc the result is an ordered factor: > library(Hmisc) Loading required package: survival Loading required package: splines Attaching package: 'Hmisc' The following object(s) are masked from 'package:survival': untangle.specials The following object(s) are masked from 'package:base': format.pval, round.POSIXt, trunc.POSIXt, units > with(InsectSprays, reorder(spray, count, median)) [1] A A A A A A A A A A A A B B B B B B B B B B B B C C C C C C C C C C C C D D [39] D D D D D D D D D D E E E E E E E E E E E E F F F F F F F F F F F F Levels: C < E < D < A < F < B In calling stats::reorder directly, I now for some reason get an ordered factor. > with(InsectSprays, stats::reorder(spray, count, median)) [1] A A A A A A A A A A A A B B B B B B B B B B B B C C C C C C C C C C C C D D [39] D D D D D D D D D D E E E E E E E E E E E E F F F F F F F F F F F F Levels: C < E < D < A < F < B Specifying, that I would need an unordered factor results in an error suggesting that stats::reorder is not used? > with(InsectSprays, stats::reorder(spray, count, median, order = FALSE)) Error in FUN(X[[1L]], ...) : unused argument(s) (order = FALSE) So the question really is how do I get an unordered factor with Hmisc loaded?

    Read the article

  • Retrieving models from form with ModelMultipleChoiceField

    - by colinjameswebb
    I am having difficulties with forms, specifically ModelMultipleChoiceField. I've pieced together this code from various examples, but it sadly doesn't work. I would like to be able to: Search for some Works on work_search.html Display the results of the search, with checkboxes next to each result Select the Works I want, via the checkboxes After pressing Add, display which works were selected. I believe everything is okay except the last part. The page simply displays "works" :( Here is the code - sorry about the length. Models.py class Work(models.Model): title = models.CharField(max_length=200) artist = models.CharField(max_length=200) writers = models.CharField(max_length=200) def __unicode__(self): return self.title + ' - ' + self.artist forms.py class WorkSelectForm(forms.Form): def __init__(self, queryset, *args, **kwargs): super(WorkSelectForm, self).__init__(*args, **kwargs) self.fields['works'] = forms.ModelMultipleChoiceField(queryset=queryset, widget=forms.CheckboxSelectMultiple()) views.py def work_search(request): query = request.GET.get('q', '') if query: qset = ( Q(title__icontains=query) | Q(artist__icontains=query) | Q(writers__icontains=query) ) results = Work.objects.filter(qset).distinct() form = WorkSelectForm(results) return render_to_response("work_search.html", {"form": form, "query": query }) else: results = [] return render_to_response("work_search.html", {"query": query }) def add_works(request): #if request.method == POST: form = WorkSelectForm(request.POST) #if form.isvalid(): items = form.fields['works'].queryset return render_to_response("add_works.html", {"items":items}) work_search.html {% extends "base.html" %} {% block content %} <h1>Search</h1> <form action="." method="GET"> <label for="q">Search: </label> <input type="text" name="q" value="{{ query|escape }}"> <input type="submit" value="Search"> </form> {% if query %} <h2>Results for "{{ query|escape }}":</h2> <form action="add_works" method="post"> <ul> {% if form %} {{ form.as_ul }} {% endif %} </ul> <input type="submit" value="Add"> </form> {% endif %} {% endblock %} add_works.html {% extends "base.html" %} {% block content %} {% if items %} {% for item in items %} {{ item }} {% endfor %} {% else %} <p>Nothing selected</p> {% endif %} {% endblock %}

    Read the article

  • How do I add descriptive text to form link .gif ?

    - by erynion
    I want to make the descriptive text around a form link also open the form. I want to make it so you can click on "Some Text Here" (below) and open the form on somesomite.com just as if you clicked on the image below this text (somebut.gif, below) <DIV style="position: absolute; top:10px; right:10px; width:70px; height:25px"> <font color="white"><b>Some Text Here<b></font> </div> <DIV style="position: absolute; top:50px; right:10px; width:70px; height:25px"> <form action="https://www.somesite.com/cgi-bin/something" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="image" src="https://www.somesite.com/somebut.gif" border="0" name="submit"> <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----LONG_KEY...> </form> </div> Thanks

    Read the article

  • How to redirect to the current page with form in php?

    - by garcon1986
    Hello, I tried to redirect to the current page with form in my php application. Now i have met a problem. <form name="myform" action="?page=matching" method="GET"> <input id="match_button" type="submit" name="button" value="button" onClick="func_load3()" /> </form> action="?page=matching" means the current page, because i use the single entry in my php application. With the code upon, When i click the button, it redirects to the homepage. And I tried to use: <form name="myform" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="GET"> but it still doesn't work. So i have to ask for help from you. Do you have any ideas about that? How to fix it? Thanks in advance.

    Read the article

  • How can I retrieve the values of controls in the form that posted?

    - by Mike at KBS
    I know this has got to be the simplest-sounding question ever asked about ASP.Net but I'm baffled. I have a form wherein my visitor will enter name, address, etc. Then I am POSTing that form via the PostBackUrl property of my Submit button to another page, where the fields are supposed to be all re-formed into new hidden fields, then POSTed again to Paypal. My problem is I cannot get at the values entered by the visitor in the original page. Any time I put in "runat='server'", ASP.Net completely changes the ID of the control, making it impossible to figure out how to access. In the POSTed form I tried Request.Form["_txtFirstName"] and that turned up null. Then I tried ((TextBox)PreviousPage.FindControl("_txtFirstName")).Text and that was null, too. I've tried variations on those. I cannot figure out how I'm supposed to get at these controls. Why does this stuff need to be so difficult?

    Read the article

  • Serializing form data with field names that have dots in them.

    - by Dave
    Does the serialize function in jQuery replace dots ('.') with underscores? For example, I have a form field such as: <input id="Project.name" name="Project.name" type="text"> When the form is POSTed, I'm serializing the form data and sending it to another PHP file to save. The dots seem to be converted to underscores. Is this normal behavior?

    Read the article

  • How to send data after form has been validated using jQuery?

    - by Keith Donegan
    I have a simple email address sign up form as follows: <form action="" id="newsletterform" method="get"> <input type="text" name="email" class="required email" id="textnewsletter" /> <input type="submit" id="signup" /> </form> Here's what I want to be able to do: Validate the form to look for an empty string or a incorrectly filled out email address one the user clicks submit or hits enter. If one of the above happens (empty string etc), I would like to generate an error to let the user know. Then once the user fills out a correctly formed email address and hits submit (or enter) I want the form to send the email address to wherever I specify in the jQuery code and then generate a little "Thank you for signing up notice", all without reloading the browser. I have looked at too many tutorials and my eyes are pretty much aching at this stage, so please don't point me to any urls (I most likely have been there). If someone could provide a barebone outline of what to do It would be so much appreciated.

    Read the article

  • Why is my form triggering the wrong controller action?

    - by COCoach
    This form has multiple submit buttons, when clicked, it calls a simple JavaScript function to change the value of a hidden input (function is called "setHidden". This worked before, after some other not relevant code, it has ceased working. Essentially, the action it is supposed to call is never called, instead it seems to default back to a previous URL. The Form: <form action="/League/RemoveOwner" method="post"> <input type="hidden" value="1007" name="lid"/> <input type="hidden" value="0" id="index" name="index"/> <input type="image" src="../../Resources/Images/Delete.png" height="12" alt="Remove Owner" title="Remove Owner" onclick="setHidden('index', '1031')"/></a> coach<br /> </form> The Controller: [HttpPost] public ActionResult RemoveOwner(int id, string index) { //yada return PartialView(); } When clicking the image, it should call the remove owner controller, instead it calls the "View" controller: public ActionResult View(int id) { //yada return View(); }

    Read the article

  • Can you set a form field value with PHP?

    - by dcp3450
    I use the $_GET function to pull a value with php from the url (http:..../index.html?variable=value), basic stuff. However, I need to use that value in my form. Typically, I would set <?php echo 'value="'.$variable.'"' ; ?> or something to that effect. However, I can't use php inside my form using the editor I'm working with. Can I set a value in the form without using PHP in my form? If so, how?

    Read the article

  • How to display records below form on submission in php without the use of database?

    - by OM The Eternity
    I have a form with multiple fields in it along with a image input field, just below the form i have a list to be displayed on every submit of this form... this has to be done without the use of DB.. I think this can be achieved by using session but its not working with me, as evrytime page gets refreshed and session gets recreated/reset.. Please help me in resolving this issue

    Read the article

  • how many dojo fliteringselect can I have on a form?

    - by Grant Collins
    I have a quick question How many dojo filteringselects can I have on a form? I have a form with 2 filteringselects on it, both getting data from different json datastores to populate the values. However only the first filteringselect is being populated, the other grabs no data. I am using Zend Framework and Zend_Dojo_Form to create the form elements for this. Many thanks. Ok looks like my code is broken somewhere then. The element that is failing in my form is: $location = new Zend_Dojo_Form_Element_FilteringSelect('location'); $location->setAutocomplete(true) ->setStoreId('countiesstore') ->setStoreType('dojo.data.ItemFileReadStore') ->setStoreParams(array('url' => $baseUrl.'/dojo/counties')) ->setAttrib('searchAttr', 'title') ->setRequired(true) ->removeDecorator('DtDdWrapper') ->removeDecorator('label') ->removeDecorator('HtmlTag') ->removeDecorator('Error'); When I go to http://localhost/dojo/counties I get the json file to read, but the element isn't populated with any data. Any ideas?

    Read the article

  • Clear Fillable Online PDF Files

    - by May
    I filled in an online pdf form. After I finished, I closed the window thinking that the form will clear itself since I didn't save it. When I went back to the website and clicked on the form again, it still had the information that I entered. Other than manually deleting all the information on the form, is there another way of clearing the form?

    Read the article

  • Spring validation errors not displayed

    - by Art Vandelay
    I have the following situation. I have a validator to validate my command object and set the errors on a Errors object to be displayed in my form. The validator is invoked as expected and works okay, but the errors i set on the Errors objects are not displayed, when i am sent back to my form because of the validation errors. Validator: public void validate(Object obj, Errors err) { MyCommand myCommand = (MyCommand) obj; int index = 0; for (Field field : myCommand.getFields()) { if (field.isChecked()) { if ((field.getValue() == null) || (field.getValue().equals(""))) { err.rejectValue("fields[" + index + "].value", "errors.missing"); } } index++; } if (myCommand.getLimit() < 0) { err.rejectValue("limit", "errors.invalid"); } } Command: public class MyCommand { private List<Field> fields; private int limit; //getters and setters } public class Field { private boolean checked; private String name; private String value; //getters and setters } Form: <form:form id="myForm" method="POST" action="${url}" commandName="myCommand"> <c:forEach items="${myCommand.fields}" var="field" varStatus="status"> <form:checkbox path="fields[${status.index}].checked" value="${field.checked}" /> <c:out value="${field.name}" /> <form:input path="fields[${status.index}].value" /> <form:errors path="fields[${status.index}].value" cssClass="error" /></td> <form:hidden path="fields[${status.index}].name" /> </c:forEach> <fmt:message key="label.limit" /> <form:input path="limit" /> <form:errors path="limit" cssClass="error" /> </form:form> Controller: @RequestMapping(value = REQ_MAPPING, method = RequestMethod.POST) public String onSubmit(Model model, MyCommand myCommand, BindingResult result) { // validate myCommandValidator.validate(myCommand, result); if (result.hasErrors()) { model.addAttribute("myCommand", myCommand); return VIEW; } // form is okay, do stuff and redirect } Could it be that the paths i give in the validator and tag are not correct? The validator validates a command object containing a list of objects, so that's why i give a index on the list in the command object when registering an error message (for example: "fields["+index+"]".value). Or is it that the Errors object containing the errors is not available to my view? Any help is welcome and appreciated, it might give me a hint or point me in right direction.

    Read the article

  • Mechanize form submit not going to the correct response page, no errors as to why. Something I'm doing?

    - by Zack Shapiro
    I threw this all in one controller for testing purposes. My code fills out the form correctly for adding a new address to your Amazon account. There are two buttons that submit this form, one takes you to add a new address which is what I don't want, and the other is just a Save & Continue input/image. When I submit the form via that button, as I do below, the form is still on the page, filled out as I have with my code. Inspecting the page titles, they're the same. There are no discernible errors that Mechanize or Amazon spit back. Any ideas? class AmazonCrawler def initialize @agent = Mechanize.new do |agent| agent.user_agent_alias = 'Mac Safari' agent.follow_meta_refresh = true agent.redirect_ok = true end end def login # login_url = "https://www.amazon.com/ap/signin?_encoding=UTF8&openid.assoc_handle=usflex&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&openid.pape.max_auth_age=0&openid.return_to=https%3A%2F%2Fwww.amazon.com%2Fgp%2Fcss%2Fhomepage.html%3Fie%3DUTF8%26ref_%3Dgno_yam_ya" login_url = "https://www.amazon.com/gp/css/account/address/view.html?ie=UTF8&ref_=ya_add_address&viewID=newAddress" @agent.get(login_url) form = @agent.page.forms.first form.email = "[email protected]" form.radiobuttons.first.value = "0" form.radiobuttons.last.check form.password = "my_password" dashboard = @agent.submit(form) end end class UsersController < ApplicationController def index response = AmazonCrawler.new.login form = response.forms[1] # fill out form form.enterAddressFullName == "Your Name" form.enterAddressAddressLine1 = "123 Main Street" form.enterAddressAddressLine2 = "Apartment 34" form.enterAddressCity = "San Francisco" form.enterAddressStateOrRegion = "CA" form.enterAddressPostalCode = "94101" form.enterAddressPhoneNumber = "415-555-1212" form.AddressType = "RES" new_response = form.submit( form.button_with(value: /Save.*Continue/) ) end end

    Read the article

  • gwt/extjs - form not submitting

    - by msaif
    i have form tag received from designer. i need to submit the form from GWT given below. FormPanel form = null; Button submit = null; function onModuleLoad(){ form = FormPanel.wrap(DOM.getElementById("MyForm")); form.setEncoding(FormPanel.ENCODING_MULTIPART); submit = Button.wrap(DOM.getElementById("OK")); submit.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { // button clicked confirmed form.submit(); } }); formSubmitHandler = form.addSubmitHandler(new SubmitHandler(){ public void onSubmit(SubmitEvent event) { } }); } but form was not submitted. designer wrote the following lines. form action="./a.cgi" method="post" name="MyForm" id="MyForm" input type="button" value="OK" form

    Read the article

  • How to check if FORM Realm authentication failed?

    - by Sergio del Amo
    I use FORM Authentication. <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/loginPage.jsp</form-login-page> <form-error-page>/loginPage.jsp</form-error-page> </form-login-config> </login-config> I would like to use the same JSP for my form-login-page and form-error-page, for sake of code reuse. I use a Realm ( org.apache.catalina.realm.JDBCRealm ). In my JSP, I would like to display error messages if the authentication failed. Does Realm store anything in the request, which I could check?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >