form

Using a hotkey to submit an HTML form?

Hi there, I have a very simple HTML form, only containing a submit button and a textarea. Is there an easy way to use a hotkey to submit this form, as an alternative to pressing the button? Thanks in advance :-) ...

How do I pass an array to fields_for in Rails?

I want to use fields_for on a subset of records in an association. I have a Month model, which has_many :payments. But in my form in my view I only want to have fields_for some of those payments. For example: - fields_for @month.payments.large This doesn't work. Can I pass a set of records to fields_for, rather than the usual symbo...

Name field in the input type for checkbox

Hi, I went through many online documents for checkbox input in XHTML. Can anyone clear my doubt? I mean what does this name field actually stand for? Milk: <INPUT type="checkbox" name="checkbox" value="Milk"> Chocolate: <INPUT type="checkbox" name="checkbox" value="chocolate"> Cold Drink: <INPUT type="checkbox" name="checkbox" value="C...

Zend Framework - Where to place Zend_Forms, Controller? Model? Somewhere else?

Hi Where is it best to put the code for building my Zend_Forms? I used to put this logic inside my Controllers, but moved away from that after I needed to use the same form in different places. It meant I had to duplicate the creation of forms in different controllers. So I moved the form creation code into my Models. Does this seem r...

Populate drop down list from database

I`m using this code to repopulate drop down list from the database : $city_id = 15; while($row = mysql_fetch_assoc($result)) { $selected = ($row['city_id'] == $city_id) ? 'selected="selected" ' : NULL; echo '<option value="'.$city_id .$selected . '">"'.$row['city_name'].'"</option>\n'; } It`s work like ...

NULL values jQuery Ajax from Seralize

Hey All I have a issue with Ajax From Submission and NULL values with php/mysql. First I have a simple form. <form mehod="post" action=""> Name: <input type=text" name="person[name]" value="" /><br /> Age: <input type="text" name="person[age]" value="" /><br /> Salary: <input type="text" name="person[salary]" value="" /> <a hr...

Checkbox array $_POST[data] from multipart/form-data?

I am stumped. (But then I'm no expert programmer!) I had modified a working form to include an upload script but now that it's using enctype="multipart/form-data" I can no longer seem to get at the checkbox array $_POST data. It sees it as an array, which is good I guess, but I haven't managed to do anything with it. So right now mysql...

Where should I look for code that validates forms upon input from the user?

I've been googling phrases like "form validation javascript" and "form validation ajax" but I only find code involving form validation upon the form submission. I want to write code that determines whether the field has valid input right when the user is inputting the data. How do I go about this? ...

JSF2: Submit AJAX form

I have a page that has a table list through AJAX pagination, all custom. Pagination is working properly, but the Enter key clears the form input's values instead of submitting. My submit button makes an AJAX post that causes the table to reexecute and rerender. How can I make sure that all form inputs handle the Enter button and submit ...

jQuery form submit

My goal is: When for is submitted: a validation on form is made : OK an ajax is called to see that username and password do match : OK if they don't match, display an error: OK if they match, then REALLY SUBMIT the form: NOT OK. Infact the trouble is, I cannot submit the form since there is a jquery submit event on it! function fo...

Delphi: What to do when a form fails to free when logging out of an application

I'm using Delphi (7-2010) and trying to figure out a good way to handle exceptions while freeing forms of an application. The application has several forms that are owned by the Application object. When the user logs out, I need to free all of the existing forms so no user state is maintained and then show the login dialog for the next...

can a forms action url contain querystring values?

can a forms action url contain querystring values? ...

hiding login form with Jquery

I created login from that when clicking submit button sends variables to login_success.php page.but I want to make that when I click submit button login form will be close. I can close form using Jquery <script type="text/javascript"> $(document).ready(function(){ $("button").click(function(){ $(".loginform").hide(); }); }); </sc...

is form charset required?

Hi, My website is set to UTF-8, do i have to set my forms also to utf-8 using the accept-charset for forms? My guestbook for example allows multilanguage so my guestbook database table is utf8_unicode_ci and all my webpages use the same template so the encoding for all pages is utf-8, because i set the charset for my webpages as utf-8...

jQuery how to get select change work in multiple form?

I got this script from here $(document).ready(function() { $('#choose').change(function(event) { $.post('select-ajax.php', { selected: $('#choose').val() }, function(data) { $('#update').html(data); } ); }); }); <form id='form'> <div id="update"></div...

OnLoad and OnChange (jQuery)

function safe(){ if($(this).is(':checked')){ $("select[name='sort']").attr("disabled", "disabled"); $("input[name='group']").attr("disabled", "disabled") } else { $("select[name='sort']").attr("disabled", false); $("input[name='group']").attr("disabled", false) } } $('input#safe').change(failsa...

How to simulate the action in a form when submit?

first: always is the same action. two: the form has multiple "CSS SUBMITS" like <form action="/myaction" method="POST"> <a id="foo1" name="foo1" href="#" role="form_button">submit1!</a> <a id="foo2" name="foo2" href="#" role="form_button">submit2!</a> <a id="foo3" name="foo3" href="#" role="form_button">submit3!</a> <input type="submit...

Form reset causes issues (jQuery)

$(function () { function f1() { if (this.checked) { $('select[name=two]').removeAttr('disabled'); } else { $('select[name=two]').attr('disabled', true); } } $('input[name=one]').change(f1).triggerHandler('change'); $('.reset').click(function () { $('input[name=one]')...

.val() doesn't set value for select (jQuery)

$('.reset').click(function () { $('select[name=one]').val(opt2); });​ JSFiddle here. What should I change? Thanks! ...

Classic ASP on Localhost, no form data?

I have a really odd situation going on on my local PC that I can not seems to resolve. Recently I have been contacted to extend a classic ASP website that I wrote a few years back. I unpacked the code into a sub folder of wwwroot on my current machine running XP pro. It has never had any classic ASP sites running on it. I set up IIS and...