forms

Check to see if certain fields have been filled out before a form is submitted.

Hi all, I have a form that is sending data to a MySQL database and I want to make sure several of the fields are not left blank. I think I can figure out how to do this with JavaScript, but my question is should I? When I made the database table that I am working with I made the fields that I want to make sure are filled out NOT NULL t...

Showing image / text on screen without forms in c#

How can I show something on screen wihtout using forms? Actually, I want to show some text and images popping on screen. ...

Why is this Javascript code not writing to the webpage?

Hi, I have just started learning Javascript. I want "Hello World!" to be written to a webpage once a user clicks a button. I have tried this: <html> <head> <script type="text/javascript"> function displaymessage() { document.write("Hello World!"); } </script> </head> <body> <form> <input type="button" value="Click me!" onclick="displa...

How to set HTML value attribute (with spaces) using PHP

When I use PHP to set the value of a HTML form input element, it works fine provided I don't have any spaces in the data. Here's the code: <input type="text" name="username" <?php echo (isset($_POST['username'])) ? "value = ".$_POST["username"] : "value = \"\""; ?> /> If I enter "Jonathan" as the username, it is repeated back to me a...

Accessing a Form thats already been instantiated

In C#, using CF, how do you display a window that already has a previous instance loaded into memory? Example: Form1 has a textBox1 and a button. Some text is typed into texBox1. The button click of Form1 loads Form2 which also has a button. Clicking Form2's button calls Form3. How do you call the already running instance of Form1 to...

Change bg color when radio btn is selected.

I need to change the bg color of a div containing a radio button when the user slects the button. I am using jquery - so its seems like there should be some simple way to accomplish this. I have my html setup something like this: <div class="sales_box"> <table> <tr> <td class="radio_cell"><input type="radio"></td> </tr> </table> </div>...

Change bg on radio deselect

This is just an add on to my last question. Once I deselect the radio button I need to return the background color to its original state. So the solution we came up with is: $(document).ready(function(){ $('input:radio').change(function(){ $(this).closest('div').toggleClass('highlight'); }); }); Now I need to remove th...

django dynamic forms with widgets

I am using the tutorial at http://proteus-tech.com/blog/cwt/django-dynamic-form/ for creating dynamic forms. It works perfect for creating the forms, but I would like to use some of the inputs with a Textarea widget. This is the code that is working from the tutorial, without any widgets defined: from django import forms form_config = ...

PHP- for some reason I cant get my radial buttons to work

I used a form generator to create a simple for me to work with. I noticed that my radial and checkbox buttons didnt seem to be working. EDIT: This is out of my HTML DOC this is what i have for my buttons: <tr><td><label><input type='radio' name='gender' value='male'>Male</label></td></tr> <tr><td><label><input type='radio' name='gende...

Django form validation in views

Hi, I was wondering if it was possible to do form validation in django views. I have usecases where I have one view with 2 forms. Each forms has their own clean method and such, but what i can't do at the form level is to check if one value is present in the one form, do something else in the other form. This is simple to check in a vi...

jQuery (UI): Detect checking of a checkbox

How can I make jQuery fire an event when a user checks a checkbox? <input type="checkbox" id="test" name="test" /><label for="test">Check me</label> I could do it with .click though that doesn't work when the user tabs to the checkbox. I wasn't able to find info on this in the api docs or while googling. Cheers. ...

Passing form values to jQuery lightbox

I am trying to get some values from my form into a lightbox that I am calling. Everything works great if I hard code the form values into the jQuery ajax post but I can't get the form values to properly pass into ajax function unless the values have been selected and the page has been reloaded. So somehow I need to get the values of the ...

Ruby on Rails: Submitting an array in a form

I have a model that has an attribute that is an Array. What's the proper way for me to populate that attribute from a form submission? I know having a form input with a field whose name includes brackets creates a hash from the input. Should I just be taking that and stepping through it in the controller to massage it into an array? Ex...

Disable validation of HTML5 form elements

In my forms, I'd like to use the new HTML5 form types, for example <input type="url" /> (more info about the types here). The problem is that Chrome wants to be super helpful and validate these elements for me, except that it sucks at it. If it fails the built-in validation, there's no message or indication other than the element gettin...

PHP form generation and validation standalone class

Hi all, I am looking for a form class that: Is standalone/doesnt need a framework to run Has easily configurable validation Has validation and generation for all form fields including checkboxes(one solution I found was great except it didnt have any check box functionality) I have had a look on google and stackoverflow but most eve...

JavaScript error : 'document.advanced_search.keywords', null or not the object.

Hello, I'm developing the ajax search script. it's the simple code, I get javascript error. I can't see the error! And I don't understand why I have an error here: <script> var keywords = document.advanced_search.keywords.value; alert(keywords); </script> <form name="advanced_search"> <input name="keywords" type="text" value="213123...

Is it possible to translate Oracle Forms6 application to Windows Forms (.net) ?

Is there any tool that would help to move/translate appliaction written in oracle forms6 to .net ? maybe not whole application at once, but maybe modules/forms(screens) to windows forms. I know that languages are different (pl/sql vs .net) but maybe that tool could make some template and programmer would be responsible to translate busin...

How do you target the disabled state of a submit button?

I have looked all over and can't figure this out: how do you target the disabled state submit button in css? For example: How would I target and style this button: <input value="Validate" disabled="disabled" type="submit"/> ...

jQuery: Problems with detecting if a checkbox is checked

Hey, I'm creating a small jQuery plugin for my CMS that styles certain form input types (just radio, checkbox at the moment). It works by hiding the original form element and placing a normal HTML element (for styling with CSS) in the input's place. It then detects actions on the element and updates the original input accordingly. Additi...

Combine multiple fields to one value for form submission

Continuing from my earlier question, how can I combine the month, day, and year <select>s into a single "date" value, so that it arrives at my PHP script as $_POST['date'], in MySQL format YYYY-MM-DD? ...