Search Results

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

Page 21/782 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Documents/links on preventing HTML form fiddling?

    - by larryq
    Hi everyone, I'm using ASP.Net but my question is a little more general than that. I'm interested in reading about strategies to prevent users from fooling with their HTML form values and links in an attempt to update records that don't belong to them. For instance, if my application dealt with used cars and had links to add/remove inventory, which included as part of the URL the userid, what can I do to intercept attempts to munge the link and put someone else's ID in there? In this limited instance I can always run a check at the server to ensure that userid XYZ actually has rights to car ABC, but I was curious what other strategies are out there to keep the clever at bay. (Doing a checksum of the page, perhaps? Not sure.) Thanks for your input.

    Read the article

  • Longer Form Fields in Drupal

    - by Slinger Jansen
    I have a really silly problem that has cost me a load of time already. I have created a content template with a URL in there. When I look at the HTML code for it, I see a big fat "maxlength=256" in the form tag. I'd like to expand the length of this field, because my customer wishes to enter really long links (over 500 characters). Any idea how I can change it? When I do a generic search through the code I see so many occurences of 256, but the length might just as well be in the database somewhere. I have of course made the database field a longer varchar (1024 sounded poetic to me), so that's something I don't have to worry about. I think it's silly, but the customer's always right, as we know. I am using Drupal 6.14.

    Read the article

  • php Form to Email sanitizing

    - by Jacob
    Hi, im using the following to send a contact us type form, iv looked into security and only found that you need to protect the From: bit of the mail function, as ive hardcoded this does that mean the script is spamproof / un-hijackable $tenantname = $_POST['tenan']; $tenancyaddress = $_POST['tenancy']; $alternativename = $_POST['alternativ //and a few more //then striptags on each variable $to = "[email protected]"; $subject = "hardcoded subject here"; $message = "$tenantname etc rest of posted data"; $from = "[email protected]"; $headers = "From: $from"; mail($to,$subject,$message,$headers);

    Read the article

  • PHP making input from web form case insensitive?

    - by Haskella
    So I have some code here that takes user input from a standard web form: $searchsport = $_POST['sport']; $sportarray = array( "Football" => "Fb01", "Cricket" => "ck32", "Tennis" => "Tn43", ); if(isset($sportarray[$searchsport])){ header("Location: ".$sportarray[$searchsport].".html"); die; } How would I go about modifying this (I think the word is parsing?) to make it case *in*sensitive? For example, I type in "fOoTbAlL" and php will direct me to Fb01.html normally.

    Read the article

  • Looking for examples of good IDEs to analyze for Form/Report design

    - by Paul Sasik
    I am working on a basic form/report designer. Some of the features i'm looking to implement are: Single or multiple selection of objects Alignment of objects (when several are selected) Same-sizing of objects (when several are selected) Moving/dragging of selected object(s) Selected object resizing in eight directions (using object grips) For features and look-and-feel I've analyzed and used a mixture of ideas from: MS Visual Studio 200x (most useful so far) Visio Crystal Reports My question is: Have I overlooked some other IDEs that provide these kinds of features that are better and user-friendlier examples of what to do than others i've looked at? (They don't have to be Microsoft products. That's just what i have ready access to.)

    Read the article

  • HTML javascript form submitted when image input button

    - by DreamU
    I have a form that contains this single input field, which is nothing more than a button to Print the current web page: <div align="center"> <input type="image" src="../Images/print.jpg" value="Print" onclick="printpage();" /></div> </div> After the printing, the page re-submits itself (to itself). Why does it do this and can I stop it? If I just change the type to "input", this code does not re-submit itself after printing: <div align="center"> <input type="input" src="../Images/print.jpg" value="Print" onclick="printpage();" /></div> </div> Unfortunately, our style conventions require me to use that button image rather than the standard input button.

    Read the article

  • Accessing individual HABTM records in a form

    - by Pichan
    I'm building a form in my CakePHP project that lets you edit a company's information. Among all other things, every company has at least one geographical area in which the company operates, but it may have more. The areas are selected individually using select dropdowns. The relationship between companies and areas is HABTM, because I need to be able to change the amount of associated areas without modifying the database. Currently the associations and corresponding data are handled separately, which isn't really a problem but I was wondering how it could be done using as much Cake's own 'automagic' functionality as possible?

    Read the article

  • Problem with $.get while submitting form

    - by bradenkeith
    I'm trying to verify that an Account Name is not already in use once a user fills out a form. The code looks like: $("#add_account").submit( function () { $.get( "'.url::site("ajax/check_account_name").'", {account_name: "t"}, function(data){ alert( data ); }); }); I get a $.get response if the statement sits like this: $(document).ready( function () { $.get( "'.url::site("ajax/check_account_name").'", {account_name: "t"}, function(data){ alert( data ); }); }); Which leads me to believe that my $.get statement is correct. Is there some jQuery rule I'm not familiar with that would cause this to fail in on submit scenario? In code block 1, I get values returned like they should. Block 2 gives me a blank response. Any ideas? Thanks for your time, I know you have better things to be doing.

    Read the article

  • Overlay an HTML page with an HTML form

    - by jah
    Hi folks, this is a question about the best way (or least effort of the best ways) to overlay an html page with a form. Best in this context meaning best user experience whilst meeting the functional requirements. Let's say I have a page with a short form on it; the user has to enter some financial details. To assist the user to enter an accurate value for one of the fields there's another, much longer form. The longer form needs to be displayed only if the user requests the help. For users without javascript, clicking a link will submit the short form (persisting already filled fields in a session) and the server will respond with the long form. They'll submit the long form and the server will combine the submitted data with the persisted data and serve the short form again - with the fields populated. For users with javascript I want to overlay the short form page (in a lightbox stylee) with the long form, allow them to populate the long form and then go back to the short form with less round-trips to the server. Do I: Overlay the short form page with an iframe whose target is the long form? Request the long form over ajax and stuff it into a div? Generate the long form entirely on the client-side? Some other wizadry I haven't thought of? A short explanation of the best mechanism will do me very nicely indeed. Thank you very much!

    Read the article

  • How to add CSS classes to Zend_Form_Element_Select option

    - by Jah Selassie
    Hi, I'm trying to add a CSS class to a Zend_Form_Element_Select option, but I just can't find a way to do it. The desired output would be something like this: <select name="hey" id="hey"> <option value="value1" style="parent">label1</option> <option value="value2" style="sibling">sublabel1</option> <option value="value3" style="sibling">sublabel2</option> <option value="value4" style="parent">label2</option> <option value="value5" style="sibling">sublabel3</option> <option value="value6" style="sibling">sublabel4</option> </select> But I'm getting this: <select name="hey" id="hey"> <option value="value1">label1</option> <option value="value2">sublabel1</option> <option value="value3">sublabel2</option> <option value="value4">label2</option> <option value="value5">sublabel3</option> <option value="value6">sublabel4</option> </select> I can't seem to pass a CSS class attribute to any of the options in the select element although I can style the select element itselft. My code: $sel = new Zend_Form_Element_Select('hey'); $sel->setRequired(true)->setLabel('Select an Option:'); $sel->addMultiOption('value1', 'label1', array('class' => 'parent')) ->addMultiOption('value2', 'sublabel1', array('class' => 'sibling')) (etc...); After researching a bit I found out that Element_Select doesn't have a method for adding CSS styles to the options in the select box, only for the select itself. So, how can I add them? Should I extend the form_element_select? Or would a custom decorator suffice? Can anyone give me a hint? I'm baffled with this. Thanks in advance!

    Read the article

  • Jquery validations on form with no fields

    - by jcovert
    I have a table (in a form) populated with radio buttons (with a button for each value in a collection). If the collection is empty, nothing shows up in the table (which is fine). (I'm using Struts2) My trouble comes when validating that the user has selected one of these radio buttons when the submit button is clicked. I'm using JQUERY validations, and it works quite well UNLESS there are no radio buttons to select (collection is empty). $('#startProcessForm').validate({ rules: { selectedProcess: { required: true } }, messages: { selectedProcess: "Please select a process to start." } }); If the list IS empty, then there are no fields (radio button or otherwise) named "selectedProcess". So my question is this: How can I make "selectedProcess" exist AND fail the 'required:true' validation if there's nothing in the collection? I was thinking I could create an empty tag of the same name (selectedProcess) if the collection is empty? Here's what I'd guess would work but doesn't seem to: <s:if test="processes != null && !processes.isEmpty()"> <s:iterator value="processes" status="processesStatus"> <tr> <td><s:radio name="selectedProcess" list="{name}"></s:radio></td> </tr> </s:iterator> </s:if> <s:else> <tr> <td><a name="selectedProcess"></a></td> </tr> </s:else> Thanks!

    Read the article

  • jquery form wizard validation

    - by SoulieBaby
    Hi all, I'm trying to implement a validation script (bassistance) with a jquery form wizard (http://www.jankoatwarpspeed.com/post/2009/09/28/webform-wizard-jquery.aspx) but I'm having some problems. On the page for the jquery wizard, a guy named "Tommy" came up with a piece of code to implement bassistance with the code. But for some reason I can't get it to work. It comes up saying if the field needs to be filled in etc and the next button doesn't work - which is fine, BUT, if I fill in all the fields, the next button still doesn't work.. function createNextButton(i) { var stepName = "step" + i; $("#" + stepName + "commands").append("<a href='#' id='" + stepName + "Next' class='next'>Next ></a>"); /* VALIDATION */ if (options.validationEnabled) { var stepIsValid = true; $("#" + stepName + " :input").each(function(index) { stepIsValid = !element.validate().element($(this)) && stepIsValid; }); if (!stepIsValid) { return false; } } /* END VALIDATION */ $("#" + stepName + "Next").bind("click", function(e) { $("#" + stepName).hide(); $("#step" + (i + 1)).show(); if (i + 2 == count) $(submmitButtonName).show(); selectStep(i + 1); }); } Could someone help me figure this one out? :)

    Read the article

  • MVC2 Client Validation isn't working when getting form from ajax call

    - by devlife
    I'm trying to use MVC2 client-side validation in a partial view that is rendered via $.get. However, the client validation isn't working. I'm not quite sure what the deal is. [Required(ErrorMessage = "Email is required")] public string Email { get; set; } <% using ( Ajax.BeginForm( new AjaxOptions { Confirm = "You sure?" } ) ) { %> <%: Html.TextBoxFor( m => m.Email, new { @class = "TextBox150" } )%> <%= Html.ValidationMessageFor( m => m.Email )%> <input type="submit" value="Add/Save" style="float: right;" /> <% } %> I'm not doing anything special to render the the partial view. Just putting the html into a div and showing it in a modal popup. On a side note, does anyone know if it's possible to submit the form with client validation without a submit button?

    Read the article

  • How to add text to email sent from a php contact form

    - by JustStatic
    Hi all this is the PHP im using: <?php $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $message = $_POST['message']; $formcontent=" From: $name \n Phone: $phone \n Message: $message"; $recipient = "[email protected]"; $subject = "Contact Form"; $mailheader = "From: $email \r\n"; mail($recipient, $subject, $formcontent, $mailheader) or die("Error!"); echo "Thank You!" . " -" . "<a href='contact.html' style='text-decoration:none; color:#ff0099;'> Return Home</a>"; ?> Its working perfectly fine but i would like there to be some text sent with this email that says "This is from your website" or something similar to tell the recipient that it isnt spam (my client isn't tech friendly and sees everything plain text as spam). I'm very new to PHP with nearly 0 knowledge and have no idea how to add something like that. I did have a go at making a new variable with the string inside and then include that in the: mail($recipient, $subject, $formcontent, $mailheader) or die("Error!"); line but with no success. Thanks for taking the time any help would be welcome.

    Read the article

  • How do I stop redirection after form submittion?

    - by Noor
    I had a similar question posted here a few hours ago, just now I got the answer that I should look into using AJAX to do this. Since I want to complete this part of the site today I can't afford to learn AJAX from the basics to do this now.. This shouldn't be something difficult and I thougt that I would be able to do this but I'm not skilled enough... I have a form, when you click submit, it posts to twitter.com/statuses/update.xml and I need to be able to do so without being redirected there. Is there an easy way to do this or do I need to learn AJAX? Thankfull for any answer at all..! edit: I'm using this to submit: $(function() { $("#skikka").click(function() { var dendar = "http://" + $("#usernam").val() + ":" + $("#passwo").val() + "@twitter.com/statuses/update.xml"; $("#formen").attr("action", dendar); $("#formen").submit(); alert(dendar); return false; }); });

    Read the article

  • How can I append a description to a Zend_Form_Element?

    - by Mallika Iyer
    I have the following Zend_Form_Element: $imginstructions = "Some description"; $img = $this->createElement('select','img'); $img->setAttrib('class', 'image-select'); $imgdecorator = $img->getDecorator('Description'); $imgdecorator->setOption('escape', false); $img->setLabel('Image:') ->setRequired(true) ->addMultiOptions($images) ->setValue('') ->setDescription($imginstructions) ->addErrorMessage('You must select an image'); $img->size = 5; $this->addElement($img); The description should appear next to the select box. The problem is : When an error is thrown, the html rendered changes so the description shows up below the select box, instead of beside it. HTML rendered before error is thrown: <dd id="img-element"> <select size="5" class="image-select" id="img" name="img" style="display: none;"> ...........options.............. </select> <p class="description">Some Description</p></dd> HTML rendered after error is thrown: <dd id="img-element"> <select size="5" class="image-select" id="img" name="img" style="display: none;"> ...........options.............. </select> <ul class="errors"><li>You must select an image</li></ul> <p class="description">Some Description</p></dd> Is there a way to force the error message to be appended as the last element in the DOM tree for the dd element? Something like: <dd id="img-element"> <select size="5" class="image-select" id="img" name="img" style="display: none;"> ...........options.............. </select> <p class="description">Some Description</p> <ul class="errors"><li>You must select an image</li></ul></dd> so the 'ul' is at the end of the dd DOM tree. Thanks, I appreciate your taking the time to respond to this question!

    Read the article

  • Best practice PHP Form Action

    - by Rob
    Hi there i've built a new script (from scratch not a CMS) and i've done alot of work on reducing memory usage and the time it takes for the page to be displayed (caching HTML etc) There's one thing that i'm not sure about though. Take a simple example of an article with a comments section. If the comment form posts to another page that then redirects back to the article page I won't have the problem of people clicking refresh and resending the information. However if I do it that way, I have to load up my script twice use twice as much memory and it takes twice as long whilst i'm still only displaying the page once. Here's an example from my load log. The first load of the article is from the cache, the second rebuilds the page after the comment is posted. Example 1 0 queries using 650856 bytes of memory in 0.018667 - domain.com/article/1/my_article.html 9 queries using 1325723 bytes of memory in 0.075825 - domain.com/article/1/my_article/newcomment.html 0 queries using 650856 bytes of memory in 0.029449 - domain.com/article/1/my_article.html Example 2 0 queries using 650856 bytes of memory in 0.023526 - domain.com/article/1/my_article.html 9 queries using 1659096 bytes of memory in 0.060032 - domain.com/article/1/my_article.html Obviously the time fluctuates so you can't really compare that. But as you can see with the first method I use more memory and it takes longer to load. BUT the first method avoides the refresh problem. Does anyone have any suggestions for the best approach or for alternative ways to avoid the extra load (admittadely minimal but i'd still like to avoid it) whilst also avoiding the refresh problem?

    Read the article

  • website attack form submission triggering emails related questions

    - by IberoMedia
    We are experiencing website attacks that trigger the submission of a form, and send alert emails. Normal process of form submission is to fill up a couple of text fields, and when the user is redirected, the next page processes $_POST. If $_POST exists, then the email to intended form recipients is triggered. What is happening right now, we are receiving the email of the form submission, three emails at a time with same information. The information per email is the same, but not all of the spam emails contain the same information, each batch of triggered emails has unique information. The form has no captcha, and if possible we would like to keep it this way. The website has worked fine and had no spamming problems until today. We have monitoring software for the website, but whoever is submitting this form over and over is not being recorded by the tracking software WHY IS THIS? IS THE PERSON ACTUALLY VISITING THE WEBSITE? The only suspicious visit tracked was on November 10th, and this record ALSO shows three forms submitted (this is how I identified possible first visit by attacker). Then no incidents until today. WHAT IS THE GOAL of the spam attack? Is the attacker expecting us to respond to the bogus emails? What can they achieve with repeated submission of form Why are three emails triggered in the row? Is this indicative that they may be using a script? This is a PHP website. Is there a way for a client to view the PHP code of a page? Thank you

    Read the article

  • ObjectDisposedException when .Show()'ing a form that shouldn't be disposed.

    - by user320781
    ive checked out some of the other questions and obviously the best solution is to prevent the behavior that causes this issue in the first place, but the problem is very intermittent, and very un-reproduceable. I basically have a main form, with sub forms. The sub forms are shown from menus and/or buttons from the main form like so: private void myToolStripMenuItem_Click(object sender, EventArgs e) { try { xDataForm.Show(); xDataForm.Activate(); } catch (ObjectDisposedException) { MessageBox.Show("ERROR 10103"); ErrorLogging newLogger = new ErrorLogging("10103"); Thread errorThread = new Thread(ErrorLogging.writeErrorToLog); errorThread.Start(); } } and the sub forms are actually in the main form(for better or worse. i would actually like to change this but would be a considerable amount of time to do so): public partial class FormMainScreen : Form { Form xDataForm = new xData(); ...(lots more here) public FormMainScreen(int pCount, string pName) { InitializeComponent(); ... } ... } The Dispose function for the sub form is modified so that, the 'close' and 'X' buttons actually hide the form so we dont have to re-create it every time. When the main screen closes, it sets a "flag" to 2, so the other forms know that it is actually ok to close; protected override void Dispose(bool disposing) { if (FormMainScreen.isExiting == 2) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } else { if (xData.ActiveForm != null) { xData.ActiveForm.Hide(); } } } So, the question is, why would this work over and over and over again flawlessly, but, literally, about every 1/1000 of the time, cause an exception, or rather, why is my form being disposed? I had a suspicion that the garbage collector was getting confused, because it occurs slightly more frequently after it has been running for many hours.

    Read the article

  • Multiple inputs on a single line with Twitter Bootstrap and Simple Form 2.0

    - by noel_g
    I am using simple_form 2.0 with twitter bootstrap. I am trying to determine what is the proper wrapper format in order to get something like [city] [State] [Zip] I believe my form needs to be <div class="control-group"> <%= f.input :city,:wrapper => :small, :placeholder => "City", :input_html => { :class=>"span2", :maxlength => 10},:label => false %> <%= f.input :region, :wrapper => :small , :placeholder => "Region", :input_html => { :class=>"span1", :maxlength => 5}, :label => false %> <%= f.input :postal_code, :wrapper => :small, :placeholder => "Postal Code",:input_html => { :class=>"span2", :maxlength => 10},:label => false %> </div> I tried this wrapper config.wrappers :small, :tag => 'div', :class => 'controls inline-inputs', :error_class => 'error' do |b| b.use :placeholder b.use :label_input end I believe I would need to define the CSS as well, but before I go down a rabbit hole I thought I would ask if this is built in somewhere.

    Read the article

  • Prohibit ampersand in Rails form

    - by snlsn
    NOT a Rails 3 issue In a Contact model I have a company_name attribute. For reasons that don't matter to this question, I want to prohibit an ampersand character. We have a lot of clients with ampersands in their company name, and users forget they aren't allowed to use this character. This isn't an html sanitize issue. I don't care about whitespace or CDATA or anything. The entries in this field are plain text and I don't want an ampersand to be entered in this one field in any way, shape or form. I assume a validation on the model is the way to go. I have tried validates_exclusion_of. I have tried validates_format_of. No success. I'm unsophisticated when it comes to regex, so I might be doing things very wrong. But the bottom line is - I need to prevent a user from entering that "&" character in the company_name field. Thanks a million. Steve

    Read the article

  • Possible to Dynamic Form Generation Using PHP global variables

    - by J M 4
    I am currently a fairly new programmer but am trying to build a registration page for a medical insurance idea we have which captures individual information and subsequent pieces of information about that individual's sub parts. In this case, it is a fight promoter enrolling his 15+ boxers for fight testing services. Right now, I have the site fully laid out to accept 7 fighters worth of information. This is collected during the manager's enrollment. However, each fighter's information is passed and stored in session super globals such as: $_SESSION['F1Firstname']; and $_SESSION['F3SSN3'];. The issue I am running into is this, I want to create a drop down menu selector for the manager to add information for up to 20-30 fighters. Right now I use PHP to state: if ($_SESSION['Num_Fighters'] 6) ... then display the table form fields to collect consumer data. If I have to build hidden elements for 30 fighters AND provide javascript/php validation (yes I am doing both) then I fear the file size for the document will be unnecessarily large for the maanger who only wants to enroll 2 fighters. Can anybody help?

    Read the article

  • posting form with file upload

    - by Jan
    I am having trouble with uploading a file when using jquery. I have the following HTML in a form. <fieldset> <ul> <li> <div class="field"><input size="35" type="file" name="formFile" id="formFile"/></div> </li> <li> <div class="field"><input size="35" type="text" name="formFileName" id="formFileName" /></div> </li> </ul> </fieldset> To post the data I am using $('#myForm').ajaxForm( When I post the data and the recieved data contains some javascript, the javascript is not recognised. I expected the javscriptcode to run when the data is recieved, but it happens to early. The results indicates that $ or jquery could not be found. If I remove the name attribute from the input type=file element, there are no errors, but that is not the correct solution. How could this happen?

    Read the article

  • Declaring an object of a conditional type with a System.Type

    - by Chapso
    I am attempting to launch a specific form depending on the selected node of a treeview on the doubleclick event. The code I need to use to launch the form is a little bulky becuase I have to ensure that the form is not disposed, and that the form is not already open, before launching a new instance. I'd like to have all of this checking happen in one place at the end of the function, which means that I have to be able to pass the right form type to the code at the end. I'm trying to do this with a System.Type, but that doesn't seem to be working. Could someone point me in the right direction, please? With TreeView.SelectedNode Dim formType As Type Select Case .Text Case "Email to VPs" formType = EmailForm.GetType() Case "Revise Replacers" formType = DedicatedReplacerForm.GetType() Case "Start Email" formType = EmailForm.GetType() End Select Dim form As formType Dim form As formType Try form = CType(.Tag, formType) If Not form.IsDisposed Then form.Activate() Exit Sub End If Catch ex As NullReferenceException 'This will error out the first time it is run as the form has not yet ' been defined. End Try form = New formType form.MdiParent = Me .Tag = form CType(TreeView.SelectedNode.Tag, Form).Show() End With

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >