forms

rails build method for complex model with days of the week

I have a set of nested models for storing prices for individual rooms. Ie. Places Rooms Room_rates Each model has the necessary accepts_nested_attributes_for and has_many belongs_to association and I have a form and a build method which works perfectly for the initial creation. My question is how to make a smarter contro...

Is it appropriate to dispense with <form> tags when building an ajax application?

I'm working on an ajax application that makes extensive use of jQuery. I'm not worried about whether or not the application degrades gracefully. So far I have been using Malsup's excellent jQuery form plugin to create forms that submit ajax requests. (For example, to submit updated record information.) However I am considering dispen...

How to find text in a richtextbox

I have 2 forms. A main one which has a richtextbox on (aswell as other stuff) and another which is used to find text in the richtxtbox on frm1. The second form consists of a textbox for the user to enter the word they are looking for, and 2 buttons. One for Find and one for Find next. When the find button is selected the found text is h...

Reaching listview from another form

I create my listview in my design part, not programmatically. Then I want to reach this listview's content when I pressed some button. In my main form, I created a public listview to return listview2 as in my design. public ListView lst { get { return listView2; } set { listView2 = value; } } Then in my other...

Trouble with jQuery form submit

I am at a loss here with some simple jQuery. I have the following code in a separate file: $(document).ready(function(){ //$("#trackit").click(function() { $.ajax({ type: "POST", url: 'include/trackit.php', data: "trackingNum=123456", success: function(data) { alert(data); } })...

rails complex form and ordering with build

I have complex form similar to a recent Ryan Bates screencast The nested elements work fine however. I'm creating or updating a grid of data such as this through a form where the day's prices are the input. My problem begins when they leave one blank. I have the nested_attributes_for option for not saving nils and it works, if they o...

How to remove the selected radio button when clicking on an element within page using Jquery

Hello guys, Okay i'm stuck on something here. This is the page i'm working on: https://www.passovermeal.org/ I have two radio buttons with text input fields attached to each. If the second radio button is selected I would like to remove value from first text field. Now if I click on an area on my page like a div with an id of #produ...

as3: How to upload bitmap data to server using httpRequest

Hi! I captured screenshot of my ui element, and would like to send it to server, using httpService. Currently I am doing the following: var httpService:HTTPService = new HTTPService(); httpService.method = "POST"; httpService.url = "/admin/compositions/add/"; httpService.addEventListener(ResultEvent.RESULT, onresult); var bitmapData:B...

How do you recommend I pass data from one form to another, and finally to another final page?

I'm taking a class in PHP and I'm a real newbie when it comes to best practices and whatnot. I have a little homework that the teachers wants me to hand in. Create a form that asks a user for his name, last name, age and birthday. When the users clicks submit, take him to the second form and ask for his location, nationality and reli...

ASP.Net First inner form in Server Form doesn't POST.

<form runat="server" id="outer" > <form name="inner1" method="POST" action="http://www.somesite.com/page.php" > <input type="text" size="7" name="o" id="origin" value="london" ></input> <input type="submit" name="getDirectionsBtn" id="btnSubmit" value="Submit" /> <input type="hidden" name="oo" value="p" /> </form> <fo...

Zend Framework configuring decorator

if(count($this->form->email->getMessages()) > 0) { $e = '<ul>'; $m = $this->form->email->getMessages(); foreach($m as $me) { $e .= '<li>'; ...

rails validation contigent on multiple elements

I've been using accepts_nested_attributes_for for a few different models and I've got an odd situation. I can skip creation blanks thru the top model, and I can validate_presence of individual records thru the bottom, but is it possible to do a most complex validation on a set of records? I have the models Rooms and Rates. Rooms has_m...

Form refuses to submit via jQuery

I have the following form <form name="myForm" id="myForm" method="post" enctype="multipart/form-data" action="script.php"> and this jQuery $(document).ready(function() { $('#previewButton').click(function() { // Change form's target to be in a new window. $('#myForm').attr('target', '_blank'); /* * Create a hidde...

are these attempted injections on my contact form?

Hi folks, I have a PHP contact form mailer on my website. The contents don't store in a database, but are emailed directly to me. I have received a couple strange contacts in the last few days. The user has to fill in name, email, confirm email subject and message. I have a javascript security in place that verifies an email is type...

monthcalendar control selected range not drawing correctly

I have a monthcalendar control in my form and when I select a range, the range just whites out. I checked the titlebackcolor (Highlight) and titleforecolor (AliceBlue) and they are not set to white. Anyone know what I can do to correct this? ...

Visual Studio Forms Designer and the size of invisible objects

The form designer in Visual Studio is giving me fits and I'm hoping someone can at least point out what's going on. The latest incarnation involved a tab sheet with some controls on each of the sheets. Sheets #2 and #3 were done and I was working on #1--when suddenly two controls on sheet #2 vanished in the running program. Some hunti...

Windows DataGridView BindingSource Index out of range exception

Scenario: Basically i have a System.Windows.Forms.DataGridView A class that inherits BindingSource and IBindingList A class that has 2 standard List as private properties DataGridView dgv = new ... MyBindingSource bindingSource = new ... MyList list = new ... The DataGridView.DataSource property gets set to the BindingSource and...

Running another controller action in Ruby on Rails

This happened to me several times and I'm yet to find an acceptable solution. I have a form in the home page of a site, that forms points to another controller which actually does the job of processing the data. When the form is submitted successfully, the other controller sends you back to the homepage with a nice flash[:notice] messag...

Styling HTML FORM elements with padding, with width 100%

I'm styling a form by using a table with fixed-width columns and I want the input elements inside the <td> to fill the container. I know the CSS box model and I know the elements would bleed through with width: 100%, but the problem is with its consistency. <input> elements bleed through as expected but <select> elements don’t. This res...

Efficient way to serialize form data to .NET ASHX/C# from JQuery

As most people, I have read a seen a lot of examples of getting data from a form (html) and being able to effeciently handle the posted data say within an ASHX (Generic Handler) page... and from there say update a database via a stored procedure.. maybe I am trying to automate things too much?? !! So I have a HTML form with say 50+ fo...