JQuery :: Hide And Show Form Options

Dec 30, 2009

I have a form for the registration of a event for our club. Now I want this. If the check box groep is not selected there is a fieldset individu_km. If I select the check box groep this one must hide and the fieldset groep_km must be showed. This is the code i have now already found and changed.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

[Code]....

To hide the fieldset groep_km works only the fieldset individu_km won't hide.

View 1 Replies


ADVERTISEMENT

JQuery :: Toggle Function - Hide/show Table When Hide/show Button Is Pressed

Sep 12, 2011

I am trying to hide/show table when hide/show button is pressed

Problem: The code works fine when I remove 'slow' from line 10. But with 'slow' in line 10 content of toggleButton doesnt change from Hide to Show when pressed.

Code:

View 1 Replies View Related

JQuery :: Show() And Hide() Not Working If Between <form> Tags?

Oct 30, 2010

If I use the following code without the <form> tags, it works perfectly. As soon as I add in the <form> tags, the script breaks.

<form>
<button id="show">Click</button>
<div id="stuff" style="display: none;">

[code]....

View 2 Replies View Related

Jquery :: Hide / Show DIV After Click For Submit Form

Nov 10, 2010

How To show Div After Click (tell friend) link and hide div after onsubmit form ? (Using Jquery or java script)
Example :
TELL FRIENDS CLICK LINK
<div id="formhide"></div> (default is hidden).
After Click Show Loading Message and show form for send data to any email . so if Form is valid Show loading message and message Success ! so hide dive ( to default).

View 3 Replies View Related

JQuery :: Hide/show Divs Based On Form Parameters

Jun 13, 2009

I'm trying to selectively hide and show divs based on what a user specifies using three select boxes in a form. I'm probably missing something obvious, but here's what I've got and it doesn't, work, they divs just stay hidden.

<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">

[Code].....

View 2 Replies View Related

JQuery :: Show Or Hide A Single Section Of A Form Based On The Value Of A Select Box?

Aug 2, 2011

Using jQuery, the hide show part is easy. I need to show or hide a single section of a form based on the value of a select box. More specifically, if the select box is one of 30 countries, then show, else hide.

What's the easiest way to handle this?

View 4 Replies View Related

JQuery :: Show/hide Form Elements Based On Radio Button Selections ?

Mar 17, 2011

I have a set of radio buttons on my pricing page:

And a corresponding text_field input element div I'd like to display based on which radio button the user selects:

When the page loads, I'd like to see:

When the user clicks on a (different) radio button, or clicks one for the first time, I'd like whichever div is currently showing to be hidden, and the newly selected one to be shown.

Right now I have jQuery code at the bottom of my page that looks like this:

For each of the four options.

When the page loads, the correct div is shown, and when I select a new button, the new div is shown, but the already showing one isn't hidden.

I've read some posts that suggest using change() instead of click(), but others indicate that's problematic in IE.

View 1 Replies View Related

Show And Hide Form Fields?

Mar 23, 2011

I have a drop down selection where it shows and hides form inputs depending on selection. When the page loads it shows the drop down selections with no form inputs. After user selects drop down it shows the form fields. It works great but I want it to show the same form fields after the user hits the submit button which submits the page to itself. It currenlty goes back to the default selection list and doesnt show any of the form fields. Basically it hides all the form fields after the user hits submit button. How do I make it keep the last shown form fields after the user hits the submit button?

test3.html looks like this:
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Show/Hide</title>
<script type="text/javascript">

[Code]...

View 17 Replies View Related

Show/Hide Form Field In IE & Firefox

Mar 2, 2006

I found the toggle function (shown below) and applied it to a form of mine.
It works fine in IE, but in Firefox it appears to fail on the eval lines.

I've searched around but I can't seem to find the correct invocation to get
the field to appear in Firefox.

I've copied below the call and the html of the field itself.

View 7 Replies View Related

Show / Hide DIV - App Form Submit Area?

Oct 14, 2011

I'm trying to do the standard show/hide DIV, but the system I'm trying to use it in is basically this: My site has an application form submit area, and I've got a page where I can view a table with all applicants' details. One of the table fields is just a link to "view full message" (which is a text area field from the form), what I want to do is have this link display in a DIV elsewhere on the page. It needs to change according to which table row is selected.

View 2 Replies View Related

Divs Hide / Show Form Elements Showing Thru..

Sep 9, 2005

I'm doing a page w/lots of divs that I set to visibile or hidden dynamically using getElementById.. the divs are all forms... sometimes elements in a hidden form show thru on a visible form.. how can I fix this..

View 5 Replies View Related

Save Form Values - Show / Hide DIVs

Apr 29, 2009

I am creating a form that you don't actually submit in order to allow people to download files. You select different options with radio buttons and drop-down menus and then use that information to "show/hide" divs with javascript. That part works, but if the user leaves the page and then comes back, the data can be somewhat misleading. One radio button may be checked, but the corresponding div that was showing before you left the page is not (it was set to "display:block;" in css with the "onclick" or "onchange" depending on which choice on the form caused it to appear). I know that I need to set a session cookie to save the values on the form, but it is a bit more complicated because I need to set divs to "display:block;" or "display:none;" depending on what the values of the form fields are. I'm a novice at javascript. Since I am not submitting the form, I can"t use PHP.

View 9 Replies View Related

Get My Form To Show And Hide Various Divs With Radio Buttons?

Oct 26, 2010

I'm trying to get my form to show and hide various divs with radio buttons. There are multiple options in the second box of my example. When a user selects the first option, more input boxes come up. Perfect, that's what I want. However, if they decide they didn't mean to click that option and instead wanted another option, the original part that popped up doesn't disappear. I cannot figure out how to make this happen.

View 6 Replies View Related

Show - Hide Form Fields Based On Checkbox State

Mar 4, 2010

I'm trying to get the two followup questions underneath the checkbox to show up only if someone places a check there, but for some reason the way I've got it set up now it's simply hiding the area I want to show up altogether, and the checkbox has no effect on it.

Rather than waste tons of space pasting it here, here's the pastebin: [url]

Alternatively here is the live version:[url]

I'd prefer to have the form collapse when the additional questions are hidden, though if i can get this working at all.

View 2 Replies View Related

Show/hide Elements Of A Form Based On Drop Down Box Selection

Feb 13, 2006

I am setting up a contact form, and want to have a drop down box with a handful of options. Clicking one option should display fields to input username & password, whereas all others will not. So far, I've tried and (replacing 'none with 'block' for the option that is supposed to show the input fields) but neither does what I need it to. I'm fairly new to javascript, just muddling my way through with the aid of tutorials.

View 2 Replies View Related

Ajax :: Show Or Hide DIVs In A Large Registration Form

Sep 16, 2009

I am building a large registration form. In this form, a sponsor/educator must register himself or herself and then may add up to 6 more " delegates" in pairs. The first two pairs registration info on the form is shown by default. I need to hide the other two pairs until when/if the user clicks on a button to add two more delegates at a time. I used javascript to show or hide the parts of the form that I had put into two divs and adjusted the css display attribute. However, my problem was that, if the user filled out the sponsor/educator section and the first two delegates, and then decided to add two more, when the user clicked on the button to show the part of the form for delegates 3 and 4, it reset all the previous visible form fields to empty. Not good. So, I thought, maybe AJAX.

I created the request object (I am a relative novice at AJAX), had it grab a text file with the code to insert into my target div, in this case a div with id = "delegate3and4". Surprisingly however, it still reset the previous form fields to empty. Am I misunderstanding how AJAX is supposed to work? I figured that, because it does not refresh the page that this would not happen. In fact, to test this out, I created a simple page from scratch with just a single input field and then used AJAX to insert the file in a div after this field and it did not reset the previous input. So, I am totally confused about why this would be happening on my live page. The page is a php page as it submits the form to a php script for processing but I don't think this should make a difference.

View 3 Replies View Related

Show / Hide Depending On Form Selection - How Best To Arrange Data

May 13, 2009

I have a big form which I'm tidying up by only showing elements when they become relevant, based on the currently selected input (eg to only show an option for 'waist size' when garment type 'jeans' has been selected). I've done this many times, and probably used a different approach each time, so I just wanted to see what other people do. It's currently along these lines: "If a particular option is selected, then show this element, otherwise hide it".

Code:
//the onclick handler
function checkViewType() {
//go through radio inputs in the cell and check what's clicked
document.getElementById('supplierOptions').style.display=radioCollection.supp.checked?"":"none";
document.getElementById('subCatOptions').style.display=radioCollection.subcat.checked?"":"none";
document.getElementById('subCatTimeOptions').style.display=radioCollection.subcat_sumtype_time.checked?"":"none";
document.getElementById('subCatSumOptions').style.display=radioCollection.subcat_sumtype_sum.checked?"":"none";
document.getElementById('subcat_weekmonth_span').innerHTML=radioCollection.subcat_time_week.checked?"week":"month";
}

But it's a big form, with lots of nested options, and some elements can be triggered visible by several different options. So I'm looking for an elegant way to handle this without a million if..elses. Perhaps an array of element ids and which elements are allowed visible when that's selected.

View 4 Replies View Related

Dynamic Math - Show / Hide Every Type Of Form Field

Mar 1, 2011

I have a form with a field that asks for a full year. If the year is greater than 20 years ago, I'd like additional form fields to be revealed. If the year is equal to or less than 20 years ago, it will not reveal the fields. (And it should be based on getFullYear(), so I don't have to update the script every year, yeah?)

I figured out how to script onclick functions and some basic .value == functions in order to show/hide just about every type of form field. So I don't need that info. But I'm unsure of how to calculate the value.

View 1 Replies View Related

Show/Hide Text And Form Field Based On Drop Down Selection

Jul 20, 2005

I'm trying to show/hide a simple piece of text and a text field on a
form based on what choice is made from a drop down box.

<select name="dropdown" size="1">
<option selected value="">Please make a selection</option>
<option value="1">Choice 1</option>
<option value="2">Choice 2</option>
<option value="3">Choice 3</option>
<option value="4">Other</option>
</select>

i.e. if Choice 2 is selected I'd like to display a new <tr> with the
following:

<tr>
<td>New text field:</td>
<td><input name="newField" type="text size="20"></td>
</tr>

if any other choices are made, I don't want to display anything.
I've tried several onchange() functions but can't achieve what I'm
looking for.

View 6 Replies View Related

Conditional Logic In Form Fields Hide/show Email Field?

Oct 18, 2009

For some security reasons I would like to show an email field in a form ONLY if the 4 checkbox are checked.I don't want to use server side coding so I need to use javascript.I have this code, showing an alert if the 4 checkboxes are checked:

<html>
<head><script>
var conta=0;
function ctr(quale)

[code]...

It works but I nedd to ask for an email instead of showing an alert.

View 3 Replies View Related

Show / Hide Form Fields Depending On Radio Button Selection

May 29, 2005

How to show and hide form fields depending on a selected radio button.

View 14 Replies View Related

Drop-down - Show Options Dependent On Options In Another Drop-down?

Sep 4, 2009

Okay, I'm having some trouble getting my head around how to do this..

<select>
<option value="A">A</option>
<option value="B">B</option>

[code]....

View 1 Replies View Related

JQuery :: Forms - Add New Form Options

Aug 16, 2011

I google'd myself silly, I can't find tutorials for this. I hope someone could lend me a hand.

I'll try to make this simple. I have a PHP & MySQL driven site. I have a form for adding new content.

The form has a set of check box options that are pulled from MySQL.

At the bottom of the check boxes there is an "Add New" input field which I want to be used to add new check box options right above it.

database

So as I understand how this should work, when I click in the 'add new' text field, type something in, then press enter - the value of the add new field should be sent to a php script, addnew_backend.php. The form itself should not submit it's data. The PHP script will add the new value to the mysql table of options, and if successful, returns the newley generated checkbox which should fade in right above the add new text field into div#newoptions.

addnew_backend.php

View 9 Replies View Related

Jquery :: Using Select Form Field With Various Options

Apr 26, 2009

I'm not sure if my term usage is correct, but using a select form field with various options. I would like that when an option is selected, a php query is performed, and the rest of the form is updated according to the selection based query.

View 2 Replies View Related

Show / Hide Won't Show In Nested List

Jan 22, 2009

I am having problems, basically I have a set of nested lists I need to show and hide

Code:
<ul id="smenu3"><ul id="smenu4">
<li>stuff here..</li>
<li>stuff here..</li>
<li>stuff here..</li>
</ul><ul id="smenu5">
[Code]...

I always want "smenu3" to show with "smenu4" and "smenu5" collapsed... When the user clicks the link, it calls a javascript function to show "smenu4" like so...

[Code]...

View 7 Replies View Related

JQuery :: Hide All But One Div Show Again?

Apr 10, 2011

I have some divs laid on top of each other. By clicking somewehre specific I want to hide all the divs but except for one - which is related to the point i clicked - to show up.Here is my code so far:The function will be called by something like this:

<a href="javascript:void(0)"><img src="album_emilia.jpg" width="90px" height="125px" onclick="setAlbum('emilia')"/><p>Emilia</p></a>
function setAlbum(album) {
$('.right_nav').each(function() {[code].....

All these divs are in the same from the right_nav-class.I guess the problem lies within line 6, where I want to select the div that should show up and is given as the argument of the function.The commented lines are things I already tried, but didn't work either, especially $(this).style seems to be invalid.It does hide all divs as i want, but the one i want to show again doesn't show up. It just stays hidden...

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved