Js Not Working. On Select Disable Other Fields?
Mar 15, 2009
i have found the following code and altered it to disable certain fields in my form.but it does not swap the fields around from disabled to enabled and visa versa.what am i doing wrong? mthe following javascript code is in a file and i use the <link... > method within the <head> tags to include this script
function txtDisable( theForm ){
cBox = theForm.NAME;
if( cBox.options[cBox.selectedIndex].value == "st" )[code]....
View 6 Replies
ADVERTISEMENT
Mar 14, 2011
I am a big fan of the jqtransform plugin [URL]...e/jqtransform/ but have discovered that when you add to many select fields on a page, the bottom half of the select fields do not open the option fields.
I have a form which takes an passenger's date of birth, but there can be up to 9 passengers on a booking, so for every passenger there would be 3 select fields for the date of birth, the day, the month and the year. When I do not use the jqtransform plugin to style the select fields it works perfectly, but when the plugin is active the 3rd or 4th passenger's select fields's click event does not work anymore.
The code for this plugin can be found at the above mentioned url. Even you add more select fields on there example the bottom select fields do not work.
View 1 Replies
View Related
Jan 24, 2011
I have this order form where the customers can change the quantity by intput in a text field.I would like to have the text field changed with select fields, but doing so in the form, the script is not doing anymore.Can anyone have a look and tell me what to change in the scritp to accept select fields in place of the text fields.
View 5 Replies
View Related
Jun 26, 2010
disable select until user puts mark in check box. Then enable select.I have two select box's on a page. The first asks what product, the second is based on the first and presents a list of pdf's according to which product the user selected. (yes, multi dimensional)What I have works fine, but now i need to make the user put a check mark in a check box before the First SELECT box becomes enabled/available.So basically, when they agree, they can get the download.Here are my select boxes.
HTML Code:
<form>
<select name="category" style="width:180px"></select>
<select name="site" style="width:180px" onchange="openLink(this.value)"></select>[code]....
(ignore the The 'open' button. It's there in case the default option is what the user wants, so they don't have reselect via the select box.)
1. How do I disable the select boxes by default on page load?
2. How do I detect that the user has put a tick in and the enable the disabled Select box?
View 6 Replies
View Related
Jun 26, 2009
this site,I had a problem with my code. I had two radio buttons when i click the first radio button i want to appear one login form(username,password&submit button) and some fields like texbox, radio buttons.here the login form is only in enable state remaining fields must be in disable state. When i click on second radio button then i want to disappear the login form and the remaining fields must be in enable state.here is my code
<html>
<head>
<script language='javascript'>
[code]....
View 2 Replies
View Related
Jun 20, 2006
i'm trying to make unchanged fields in a form not submit, it's an order form with 50 or so text boxes where user submits quantity. the submit is full of prepopulated fields that i don't want to wade through on each email. i only need the relevant fields if the quantity has changed. Code: - item#quantity is the field that changes, and needs to submit with other relative fields (item#,item#price,item#total)
View 3 Replies
View Related
Jun 4, 2005
Until a certain option on the select box is checked. I thought this would be easy to find, but Im struggling, anyone know how to do it?
View 10 Replies
View Related
Oct 1, 2006
When the user clicks a certain radio button, I want three text fields to become disabled.
HTML Code:
<label><input name="s_type" type="radio" value="ftp" />FTP</label>
<label><input name="s_type" type="radio" value="http" />HTTP</label><br><br>
Server:
<input name="ftp_server" type="text" id="ftp_server" size="35" /><br>
Username:
<input name="ftp_username" type="text" id="ftp_username" size="35" /><br>
Password:
<input name="ftp_password" type="password" id="ftp_password" size="35" />
Could anyone show me how to disable all the text fields above when the user clicks the "http" radio button?
View 2 Replies
View Related
Jun 25, 2009
I'm a absolute beginner in Javascript But have manage to create a script that disable one textfield when a checkbox is checked.
Code:
function disableTextField(form) {
if (document.getElementById("notDone").checked == true) {
[code].....
View 5 Replies
View Related
Oct 26, 2005
I am wanting to make a few fields required after they are enabled, but it's not working well.
<script language="javascript">
function enableAdd(){
document.form1.empJobTitle.disabled=false;
document.form1.empExt.disabled=false;
document.form1.empEmail.disabled=false;
}
function disableAdd(){
document.form1.empJobTitle.disabled=true;
document.form1.empExt.disabled=true;
document.form1.empEmail.disabled=true;
}
function validateCheck(){
if(document.form1.empJobTitle.disabled=false && document.form1.empJobTitle.value=="");
alert("You must enter the employee's job title.");
return false;
if(document.form1.empExt.disabled=false && document.form1.empExt.value=="");
alert("You must enter the employee's extension.");
return false;
if(document.form1.empEmail.disabled=false && document.form1.empEmail.value=="");
alert("You must enter a valid email address for the employee.");
return false;
}
</script>
View 2 Replies
View Related
Sep 15, 2006
I want to disable three textareas when one checkbox is ticked. how would i go about doing this?
My code:
View 7 Replies
View Related
Dec 6, 2010
I have multiple forms on my website. Some of them have a checkbox which is checked by default, whereas others are unchecked by default. I'm trying to figure out how I would detect whether or not the checkbox is checked, and if it is checked, disable certain fields (not necessarily all fields), and then toggle it back and forth as I check or uncheck the box..I found this code:
Code:
<script language="javascript">
<!--
[code]....
View 4 Replies
View Related
Nov 12, 2008
I have a form that has three radio buttons. Each radio button, I have text input field. I want to be ale to check on whatever radio button, it will enable all text inputs fields for that radion button and disable the rest of the text field.Here is my form
Code:
Radio Button # 1
<input type="radio" name="paytype" id="radio" value="1" />
[code]....
View 3 Replies
View Related
Sep 29, 2007
I've created a admin center, that has two seperate login permissions. Admin which can edit listings, etc... and Viewer which can only view listings, and edit 1 or 2 of the listings details and not all of them like the admin. I've seen web-sites where certain text input fields are sort of Grayed out, not allowing for user to type, click in or change anything in that field. Sort of like the html text input field has been or is disabled. How can I get certain html text input fields to appear disabled, and the text that's inside un-editable or unchange-able?
View 3 Replies
View Related
Jan 19, 2010
I have written probably a rigged way of disabling and enabling fields and radio buttons. The only problem is that when i add the radio buttons to turn on and off the input fields wont work any more.
<script language="javascript">
function enableField()
{
[code]....
View 3 Replies
View Related
Aug 18, 2010
How do I disable the submit button if all required fields in a form are not filled in? Say I have a form with Name, Age,message, and email. Name, message and email must be filled in or else the submit button will not show or will be disabled and then enabled once filled. If the fields are filled in then the submit button will show. If the fields are filled in but then one is deleted then the submit button will hide. Ideally if I can have it disabled that will work, if not I will settle on hide at this point.
View 1 Replies
View Related
May 30, 2010
I would like to disable the submit button until all fields have been success. I have been looking for examples of call backs but could find anything I could use.
View 1 Replies
View Related
Jul 20, 2005
I've this code:
function checkdate(FormSubmit){
alert(document.getElementById('Mois').value);
if(eval(document.getElementById('Mois'))>0 &&
eval(document.getElementById('Annee'))>0){
document.forms['FormSubmit'].getElementByID('SELECTCONSTRUCTOR').disabled
= false; //can't reach the control here
}
else
{
document.forms['FormSubmit'].getElementByID('SELECTCONSTRUCTOR').disabled
= true; //can't reach the control here
}
}
....
<form name="FormSubmit" method="post" action="">
....
<select name="Mois" onChange=checkdate(this.form);>
....
<select name="Annee" onChange=checkdate(this.form);>
....
<select name="SELECTCONSTRUCTOR" disabled>
Now, what I would like, is to enable the SELECTCONSTRUCTOR if month and year
are selected (I mean different to 0).
I can't enable or disable. In fact I can't reach the control in the
checkdate function...
How can I enable/disable SELECTCONSTRUCTOR when my 2 fields are selected?
View 3 Replies
View Related
Aug 28, 2010
i am trying to pass text from one select box to another select box. The logic is if 10 are added, no more passing must happen. Also if an item is already added, it mustn't be added again.I am using the for loop to check the existence of an item but it is not working: what am i doing wrong?
Code:
function PassSelectValues(){
//pass values from select boxes to select boxes
var counter;[code]....
why isn't counter incrementing at all? The alert message box does appear saying item exists but the item gets added anyway.
View 1 Replies
View Related
Sep 9, 2011
I have 2 text boxes I want to control with a select.
I can code this problem myself, but was wondering if there is some better way to do it...
There are 4 values for the select, "", S, R, and B.
When "" is selected I want both boxes to be disabled, When S or R are selected the Stext or Rtext will be enabled respectively When B is selected both will be selected...
So I have the function to handle this in my own custom UI namespace.. Here is the function:
SRB: function() {
if ($("#SRB).val() == "B") {
// enable both boxes
} else if ($("#SRB").val() == "S") {
[Code]....
etc.. i guess you get the picture. Basically the question is, is there a way to do this without statically setting if conditions for each select box condition?
View 1 Replies
View Related
Aug 22, 2007
iam creating a signup form where i want to add extra fields depending on user drop down selection,
say, when they choose "Gamer"
i want to include new fields like
1. whats is your fav game etc...
how can i do that.
View 1 Replies
View Related
Jan 18, 2006
I need to be able to uncheck and disable a checkbox based on the option selected in a Select list.
This is what I tried.
==============
<script type="text/javascript">
function GetOptVal(OptVal)
var OptVal;
{
if(OptVal="XX") document.form1.chkbox1.disabled = false;
}
else
{
document.form1.chkbox1.checked = false;
document.form1.chkbox1.disabled = true;
}
</script>
<form name="form1">
<select name="Opt1"
onchange=GetOptVal(document.form1.Opt1[document.form1.Opt1.selectedIndex].value)>
<option value=" ">Select One</option>
<option value="XX">XX</option>
<option value="YY">YY</option>
<option value="ZZ">ZZ</option>
</select>
<input type="checkbox" name="chkbox1" />
</form>
View 2 Replies
View Related
Mar 8, 2010
I have something like this:
<select id=stuff[0] name=stuff[0]>
<option value="thing">Thing</option>
<option value="other_thing">Other Thing</option>
[code]....
I need to go through the stuff[] array via jquery and find out if ANY of them have "thing" selected.I've tried $('#stuff[0]').val(); just to get it to return at least one of the values, but no luck. I also tried on inArray()'s and indexOf()'s but if I can't even get one of the values returned then I probably shouldn't try something even more complex..
View 3 Replies
View Related
Dec 3, 2011
What I want to do is possible. This is part of the code from a larger check-in form.
This code adds a new row as needed and should also enable the text fields only after the check box is selected.
It is not working as expected and I am missing what the problem may be or if this is even possible.
[CODE]
View 9 Replies
View Related
Jul 15, 2011
I'm using jquery validation plugin but i don't know how to do a thing:I'd like to enable a text field after selected a value from a selection list.The select field is this:
<select name="examples" id="examples">
<option value="N">Normal</option>
<option value="A">Abnormal</option>
[code]....
View 2 Replies
View Related
Jan 30, 2011
Firebug returns an error saying msg.elements is undefined. I'm trying to make a function that will enabled a delete button if any of the check boxes in a list are checked.
Code:
function selectone () {
var msg = document.getElementsByName('pm');
var i = 0;
for(i; i < msg.elements.length; i++)
[Code]....
View 2 Replies
View Related