<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...
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)...
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('...
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() == '') {
...
hi all,
how can i create submit button, and define custom title on it, together with custom class style?
tnx in adv!
...
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...
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...
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...
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...
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 ...
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...
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...";
}
...
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...
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...
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...
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...
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...
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.
...
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] =...
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...