form

Simple POST random number issue in PHP

Ok I am trying to make something to ask you random multiplication questions. Now it asks the questions fine. Generates the random questions fine. But when it reloads the page the random numbers are different... how can I fix this? <?php $rndnum1 = rand(1, 12); $rndnum2 = rand(1, 12); echo "<h3>". $rndnum1 . " x "; echo $rndnum2 . "...

rails question: how to create multiple child objects linked to a parent object with a select drop down in the parents create form?

Hi there, In a booking engine for buying tickets for events, written in rails, I have the following models: an order a ticket One order has many tickets, and one ticket belongs to an event. People that want to book tickets for an event, typically create a new order. They fill in some details (kept in the order model), and at the end...

How to submit form only once after multiple clicking on submit?

Hi All, I am having problem that when i am trying to submit the form by clicking on the submit button it takes some time to post request during this if i am again click on the Submit button it will again send the all parameters and parametrs get saved twice, thrice ....so on. I don't know how to limit the the submit button so that form...

Methods to copy form values from one form to another?

I need to copy values from a form displayed in one HTML page (incoming.html) to another HTML page (outgoing.html) in a browser. What will be the best approach to this, I have tried using imacros but have not been able to figure it out. I believe there can be a javascript solution to the above. What can be the best approach, I need the fe...

Jquery validations on form with no fields

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 JQUE...

change prototype script to jquery one

I have this form submit code: Event.observe(window, 'load', init, false); function init() { Event.observe('addressForm', 'submit', storeAddress); } function storeAddress(e) { $('response').innerHTML = 'Adding email address...'; var pars = 'address=' + escape($F('address')); var myAjax = new Ajax.Updater('response', 'ajaxServer.p...

How to submit a table with dynamic rows of data via asp.net mvc or jquery?

hi guys, i'm totally noob to asp.net mvc and currently i'm writing an web app which allows user to select multiple product from a listbox and add them to a dynamic table with rows that can be added or removed. thus i'm thinking of using jquery to add and remove the table row, thus the table row will be added via append("xxx"). but the...

How to avoid form closing when click outside modal window when editing or adding a new row in JQgrid?

Hi, is there a way to avoid form closing when adding or editing a row. Jqgrid is working perfectly in our application, but there is a little problem, when the user is editing or creating a row via form editing and the user clicks outside the form's modal, the modal closes and the changes are lost. Is it posible to avoid this behavior? ...

javascript: True form reset for hidden fields.

Unfortunately form.reset() function doesn't reset hidden inputs of the form. Checked in FF3 and Chromium. Does any one have an idea how to do the reset for hidden fields as well? ...

MVC 1.0 FormCollection wiped out by running SSRS report

I have an MVC 1.0 app with a form that works just fine. The app also launches an SSRS using the URL ReportServer interface (**Not the Webform ReportViewer Control!). This also works just fine. But if I export the generated SSRS report (say to .pdf), and then return to the MVC application, no form will work. By "not work" I mean tha...

InnerHTML IE 8 doesn't work properly? Resetting form.

Yeah this works in FF and Chrome, but for some reason wont work in IE 8. I'm using a radio button to clear a section of a form.. that section is a select box, but I don't want to leave the area empty - instead I want to reset it to what it was when the page loaded. At the moment IE8 is just leaving me with an empty small select box. Htm...

PHP: simple form encoding/decoding

Hi guys, Probably, this question has been asked before, though, I'll ask it again. Currently, I'm facing a problem with form encoding. When posting my form, all spaces are replaced by the "+" character. I would like to replace this "+" character by a real space. Does someone has a PHP solution for this? Thanks in advance. Cheers, ...

Differing form size between XP and 7

I am developing a C# WinForms app on my XP dev machine with Visual C# Express 2008. I set the form to have a size of my liking with Width and Height on the designer and all looks good. I also set these dimensions to the MaximumSize property. Deploying the app to another XP machine, and the app looks like it does on my dev. However, in...

Sending hidden fields via POST in iPhone in-app email

I'm letting my App's user send email from within the app to share some content on myserver. To do so I need to include a button with two bits of data and I want to use POST to keep it somewhat hidden. I've decided to add an html form using POST and two hidden fields in the email rather, like so: NSString *buttonCode = [NSString string...

php form doesnt submit one of the fields

i have bought a template that have built in contact form problem is that it submits every thing except "company" name i messed around with it but cant get to work it. if you can point me to some solution i would be greatful thanks in advance this is php script if(!$_POST) exit; $email = $_POST['email']; //$error[] = preg_match('/\b...

CakePHP form submission with friendly URLs

Hey! I have to rewrite a form in a CakePHP application. The form searches a list of car sale ads and is pretty complex (~10 fields: model, manufacturer, fuel type etc.). Currently, the form is sent via POST and is working quite well. The problem is I need to create bookmarkable URLs from the search queries and I was wondering what was t...

What is the best way to debug when a jquery post is not firing off an asp.net mvc controller action

I put a breakpoint on the controller action but it never fires. Is there anyway to catch errors on a jquery post? here is my jquery javascript code: <script type="text/javascript"> $(document).ready(function() { $('#commitExerciseButton').live('click', function() { $.post($("#exerciseForm").attr('action'), ...

How to keep form items selected after post request?

I have a simple html form. On php page. A simple list is placed on form. I submit this form (selected list items) to this page so it gives me page refresh. I want items which were POSTED to be selected after form was submited. For my form I use such code, And It works just fine, But is it optimal or you can suggest some optimization fo...

PHP - Get value of input box, without a form?

Hello. Does anyone know how I can get the value of an input box, without having a form? I want a submit button, but instead of submitting a form, I want it to change data in a MySQL database. Something like this maybe? $img1="WHAT DO I PUT HERE?" $idx=1 $sql="INSERT INTO games SET img1='$img1' WHERE id=$idx"; $result=mysql_query($s...

How to prevent form submission for a form using onchange to submit the form when certain values are selected

I have a form I have built: <form class="myform" action="cgi.pl"> <select name="export" onchange='this.form.submit()'> <option value="" selected="selected">Choose an export format</option> <option value="html">HTML</option> <option value="csv">CSV</option> </select> </form> Now, this form works fine if I pull down ...