html-form

handling html radio boxes with php

Hi, I have a simple HTML form which consists of radio buttons where user has to select 1 out of three. Now the Objective is to save the responses of the user, so we admin can view them later. I am more interested in their actual response rather than values field. here is the sample code <table border="0"> <tr><td><input type="hidden" ...

Cleaning up HTML from textarea

Hi, I have a page with two textareas, where registered users can fill them with HTML codes. First one has TinyMCE (so HTML is cleaned up), but the other one does not, since I expect the code to be inserted as embed codes from other sites (mostly sites that provide maps, e.g. Google Maps, MapMyRace.com, etc). But problem is that those ot...

What characters are allowed in the HTML Name attribute?

I have a PHP script that will generate <input>s dynamically, so I was wondering if I needed to filter any characters in the name attribute. I know that the name has to start with a letter, but I don't know any other rules. I figure square brackets must be allowed, since PHP uses these to create arrays from form data. How about parenthes...

How to automatically switch focus of input elements on html form?

I have a html form with three inputs for phone number input. I want a cursor to move to next input after the current one is filled. Like you entered 3 digits in first box than cursor moves to second and after it is filled moves to 3rd. Is it possible to accomplish this without javascript? ...

How do i resume an upload on a HTML Form?

I asked a question and it appears no one knows the answer. So i'll ask one specific part. How can i resume a file uploaded from an html form? While uploading the user has a full network disconnect. Then when the user is back online the form resumes. Before saying it isnt possible this site appears to do it and without corruption. -edit...

Is there a javascript (jquery) library for updating html form controls from cgi parameters?

Our site has some very complicated form controls that are submitted and then show up again on the results page in case users want to resubmit the form from the results page. Currently, this requires a lot of if-then statements to preset the form controls to what was submitted. I'm wondering if there is a library (preferably jquery) t...

If you use a regular HTML <form> tag instead of the Spring <form:form> tag, how do you specify where it's submitted?

In the Spring docs, the section on multipart support has an example of specifying a multipart form as this: <form method="post" action="upload.form" enctype="multipart/form-data"> This doesn't use the Spring form tags which I am familiar with and instead submits the form to the upload.form action. How does Spring know what upload.for...

Can you mix and match Spring form tags and regular HTML form tags in a single HTML form?

I have a legacy HTML form that I want to make into a Spring form. Do I need to switch all of the form tags to Spring form tags or could I mix and match them as I please? In other words, something like this: <form:form modelAttribute="mymodel" action="/somecontroller/someaction" method="post"> <input type="text" name="something" value="...

Expire the page after submission

I'm implementing an iAuth form for a credit application in a J2EE container (JSTL+JSP+Stripes). The vendor states in the implementation guide: Expire the “Questions” page after answers submission When performing iAuth transactions you will need to “expire” the page on which the consumer's questions will be displayed after they h...

IE7 cuts-off input fields in a form

All other browsers, including IE8, render the form correctly, except IE7; I assume IE6 exibits same problem. IE7 cuts-off, shrinks the form, and shows about 5% of the input fields; I removed all css formatting but not change; I have applied several related fixes without success; help or direction as to where to find related information...

How can you print out the values of undeclared HTML form values from a Spring (3) controller action method?

If my HTML form contains two form inputs (input1 and input2), I could access them like this: @RequestMapping(value = "/foo", method = RequestMethod.POST) public String foo(HttpServletRequest request, ModelMap modelMap, @RequestParam(value = "input1") String input1, @RequestParam(value = "input2") String input2) { log...

disabling radio buttons by name attribute with jquery

say I have a bunch of radio buttons in an html form. How do I find and disable all radio input types with a given name="?" value (where ? can be anything I specify)? ...

How to implement search textbox as in stack overflow website?

I have a search textbox in the web page. When the user presses enter key after entering text in that textbox then the search function should get executed. How to do this? ...

aspx: a form is always forwarded to the same page

on the page products.aspx i created a form: <form id="send_info_form" method="post" action="send_email.aspx"> <input type="text" name="the_name /> <input type="submit" /> </form> when i click on submit it's forwarded to the same page (products.aspx) and not to the page i set in action attribute of the form. ...

HTTP file upload: Can I rely on the browser always sending a file name?

According to this great article about HTTP uploads by Scott Hanselman, the browser typically sends a file name with the file's contents. Can I rely on the file name always being transmitted or do I have to give the user the option to enter a name if none was submitted? (If a name was submitted I do not want to prompt him for a specific r...

can I use a php method in a form action?

Hi All, Is it possible to send form data to a PHP class' method rather than to a file? Or would I have to use AJAX to do this? For instance, can I have something like: <form action="my_obj::form_submit" method="post">...</form> //rather than <form action="my_obj.php" method="post">...</form> I don't want anyone to be able to access...

how to print checkboxes array in message body of mail function

Hello, I am doing a mail function in PHP. As the body of the mail function, I have a table which displays all the posted values including checkboxes. The message is as follows: $bname = $_POST['$bname']; $message = Business Name : $bname The above message is in table and Business Name is one td and $bname is anothe...

Inconsistent x,y coordinates with <input type="image">

I've seen varying behavior between browsers when clicking an input tag with the image type. On some browsers, it returns the x,y pixel offset of the image in question. On Chrome it returns negative value for y and seemingly nonsensical x values. Is this a Chrome bug, or is there some rhyme or reason for this behavior? EDIT: This occur...

Find default selected option in HTML select tag?

I found code online to clear a form but it had nothing for a select box. With jquery i tried adding code to select the default option in the select box when i reset the form. I figured the only way to find the default was to look for where the SELECTED option was. I then discovered when the user selects something else jquery does not see...

Rails select_date form name

As much as I love rails, I've always hated dealing with dates in an html form...especially when the date isn't an object's property. The select_date helper is nice, but it always generates this: <select name="date[year]" id="date_year"> <select name="date[month]" id="date_month"> <select name="date[day]" id="date_day"> And I can't fi...