form

Update value based on :checked status.

<input type="checkbox" name="feature1" value="0" /> If checked, value="1"; else value="0"; if ( $('input[name=feature1]').is(':checked') ) { $('input[name=feature1]').val('1'); } I think the above jQuery may work, but its one-time check, how do I make it that everytime the checkbox is clicked/checked, value becomes 1, else 0? Man...

How to make an input form in java code (NOT Netbeans using JForm) ?

Hi I want to make an input form so that the user can enter details in java code. Something like this : MY CODE import java.awt.GridLayout; import javax.swing.*; class JOptionPaneTest { public static void main(String[] args) { String[] items = {"One", "Two", "Three", "Four", "Five"}; JComboBox combo = new JComboBox(items)...

Javascript change <p> content depending on select option

Hi, not the best with Javascript so thought i'd ask where i'm going wrong. as the title suggests, I have a select box with 4 different options, when an option is selected I want to change the contents of a <p> tag with id of pricedesc. Here is what I have so far. function priceText(sel) { var listingType = document.getElementById('...

chrome fails on jquery form validation

Can someone explain to me why the form validation fails in chrome? http://tinyurl.com/3yphwpl Pressing the submit should colour empty fields red. I have no idea why chrome fails - would be glad to find a solution... $('form .meet').focus(function() { $('form .required').each(function() { if($(this).val() == '') { ...

Custom Submit button

hi all, how can i create submit button, and define custom title on it, together with custom class style? tnx in adv! ...

Submitting HTTPS over an iframe in IE problem

I'm working on a script to automatically sign you in to basecamp for a project... so far i have come up with the following as something simple just a form you submit which posts to an iframe: <html> <head> <style> #bc1{ width: 100%; height: 350px; } </style> </head> <body> <iframe id="bc1" name="_bc1"></iframe> <form method="post" i...

Lost OnChange after form Validation

Hi, I'm using codeigniter and when selecting a dropdown form onchange works and i get my second field ok(Country->City). When i submit the form with errors, the page reloads with the errors displayed but my onchange stops working. Any ideas for what's going on? Hmm, here's what i'm doing. User get's to homepage and fills the form, the on...

How can I have a form where the text in the input disappears when clicked? (for feedburner form)

Hi all, I've got the following "subscribe by e-mail" form: <form style="border:1px solid #ccc;padding:3px;text-align:center;" action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=food101coil', 'popupwindow', 'scrollbars=yes,width...

Django how to make tags?

if i have a question and answer system, and i want to add a tag feature, as for every question i should have some tags, separated by comma (just in stackoverflow): 1.I want to have a separate class model for that, with a foreign key to a question 2.in the form, i want the user to be able to add many tags, separated by comma, and when th...

Django reply form included into question template

if a have a question - answer system, where the answer form is included in the template of questions,(just like facebook post-comments) is there another way to save the comments for every question? how can i take the id of the question? my code: {%include "replies/replies.html"%} #thats in the template where questions are listed the ...

ASP.NET MVC Form with multiple dropdowns and checkboxes group

I am lost with the submission of listbox with multiple itmes selected and with group of checkboxes. If that was a WebForm project it wouldn't be a problem for me. What are the best practices and maybe some code samples that show proper submission of form in ASP.NET MVC2 that contains group of checkboxes and listbox with mutiple selecte...

PHP: check if any posted vars are empty - form: all fields required

Is there a simpler function to something like this: if (isset($_POST['Submit'])) { if ($_POST['login'] == "" || $_POST['password'] == "" || $_POST['confirm'] == "" || $_POST['name'] == "" || $_POST['phone'] == "" || $_POST['email'] == "") { echo "error: all fields are required"; } else { echo "proceed..."; } ...

Custom form in Wordpress?

Hello, I'm making a wordpress site which looks like and behaves less like a blog and more like a classic web site. I need to make plenty of custom forms and by now I have three equally bad solutions to this. One would be to create each form as a theme template file. Those pages would submit data to themselves and all would be great, ex...

Multiple radio buttons naming problem.

Hi guys, i have a bit of logical problem here. I have a catalog of products that have unique ids and options that are displayed to the user through radio buttons. Now my problem is that a user must be able to select different options (from different products) and to submit them to a PHP script that handles this request (via POST). The p...

Apache2 and CGI - how to keep Apache from buffering the POST data?

I'm trying to provide live parsing of a file upload in CGI and show the data on screen as it's being uploaded. However, Apache2 seems to want to wait for the full POST to complete before sending the CGI application anything at all. How can I force Apache2 to stop buffering the POST to my CGI application? EDIT It appears that it's act...

ASP.NET submit post request with keys from code behind

I am working on a page where we have a form that the user is filling some information in. When the form is submitted I want to process the information and then redirect to an external server. The catch is that I need post data to go to the external server so a redirect will not work. Is there a way to programmatically submit a form requ...

Zend Form Text value stays null

Hi, I've created a simple upload-form and got a little problem when submitting the data. The file is uploaded correctly, but my little description field stays null. Here's my form: class Upload_Form_Uploadvideo extends Zend_Form{ public function init() { $this->setName('video') ->setAction('interface/videoupload') ->setMet...

How to set value for the form element using mootools

I have a form that have input element and the select element with multi select. so how can I set value for the input element and select element in mootools. ...

Rails Polymorphic Model. How to show form validation erros on views?

I have everything on my polymorphic associations working, but if I have model validations, the erros don't show up. In my controller I have: def create @locatable = find_locatable @geographic_location = @locatable.geographic_locations.build(params[:geographic_location]) if @geographic_location.save flash[:notice] =...

validate form before submitting (more complicated than checking for empty fields)

i have a form containing inputs for times (specifically, an opening and closing time). when the submit button is pressed, it goes to a php page where these inputs are added to a database. i want to check a few things before allowing the form to submit. for example, i want to make sure that the start time is earlier than (less than) the e...