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
}
}
....
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?
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?
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++)
Is there any way to enable a form element(s) based on the selection in a <select> drop-down? I'm trying to enable/disable a group of checkboxes depending on which option is chosen in the <select> above it.I know how to enable/disable something when a box is checked (or text is entered into it) but I have no clue how to handle the <select> option.
I have a form with pairs of checkboxes. When one is checked then I want to enable the other checkbox for that pair, and disable when unchecked. I can get this to work when I have a separate function for each pair, but not if I try to use one function and pass the id of the element.[code]
i've been looking online for a while for a code that would disable 3 text fields.[code] Was unable to find one. was only able to get it to do one of fields. What i'm try to do is have a checkbox to enable and disable a row and produce a value in the totalcalls box.
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
I have a check box that is active, but everything below it is disabled. I wrote a script to enable it but the error report keeps saying that my function has no properties. Why is this?
function disable_enable(){ if (document.all || document.getElementById){ if (document.printWhere.qtyPrinter.Quality.qtyOffice.Submit.disabled==true) document.printWhere.qtyPrinter.Quality.qtyOffice.Submit.disabled=false else document.printWhere.qtyPrinter.Quality.qtyOffice.Submit.disabled=true } }
i want to disable all the textfield..when user check the radio button(let say the above one), the above textfield (txtAccNum) will be enable..im new to javascript.
In the following code I just want to disable the textbox if “other Amount is selected”, radio element 7.I have been working at this too long cause I can’t see the problem.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
I was trying to but failed to do. I have two radio of gender and two input box father name and husband name if sex selected male then fathers name will be enabled and husband name will be disabled and if female selected then fathers name will be disabled and husband name will be enabled.
I am trying to do like if country none selected city will be disabled and if usselectedthen city will be enabled.triedby this code but unable to enable city onsection.
I have an ASP page that has a master page. I have a drop down list and 2 text boxes.The change function is being executed and I get the text value of the selected list items, but the enable and disable are not working.[code]
I need to be able to disable a link upon clicking an agreement. Here is what I currently have, I am trying to make a custom button for jcryption.[code]...
I have form with Name Age Payment Mode (Combo box include payment mode 1, payment mode 2, payment mode 3) When I select a payment mode-01 enableling 5 combo boxes. If select payment mode 2 disabling that combo boxes. How do I do this thing.
came across this forum while searching for an example of how to do something in Javascript, and found the post helpful, but didn't quite answer my query completely... It was a very old thread, few years old, though so I thought best not to revive it from the murky depths :)Basically, I very rarely use JavaScript... in fact, I rarely do any programming at all, but I'm trying to build a basic site at the moment, and I'm wanting to disable/enable a text box based on the value of a drop down menu...The idea behind it is that I have a sub title, and in the admin panel, I want to be able to set whether the sub title is picked randomly from a database, or whether it chooses one, and only one...So in the admin panel, I've got a page that has a drop down menu with two options. Static, and Random. Below this, I've got a text box called Static ID... In this text box, the administrator would insert the database row ID for the specific sub title they want...
Obviously this Static ID field only applies if you select a Static sub title, rather than a Random sub title...So what I want to happen is for the text box to be disabled if the drop down menu is selected as Random... and then enabled if the drop down is selected as Static...So I came across the following script on an old post as mentioned earlier:
<script type = "text/javascript"> function enableTextbox() { if (document.getElementById("dropdown").value == "New") {
I made a small photo application using javascript that displays random pictures like a slideshow. There is text that goes with each picture that is initially hidden but becomes visible when the user clicks on a button. I have the pictures grouped into separate .js files (about 10 per group) and the page selects images at random from all separate files as if they were one. what i need to do is to be able to disable or deactivate certain photo collections by checking/unchecking a box.
then there would need to be two checkboxes (preferably at the bottom of the page), one for each .js file. if box 1 is checked then the images selected are drawn only from slide1.js. if box 2 is selected then images are only drawn from slide2.js. if neither are checked then no images are drawn, and if both are checked then images are drawn from both .js files.
Using Jquery ... How can i disable a button for 3 seconds then after that enable it when a use click a button (to avoid the user clicking without stopping)
Button Enabled -> user click the button -> button is disabled for 3 seconds -> button is enabled .
I have two radio box ()Premium Listing, () Free Listing now I want to disable all those input field (text box) having class="paidfield" when I click on ()Free Listing and enable when I click on () Premium List.I need this in Mootool because my application is using Mootool only.
I have a checkbox at the top of the page, and then I have a form full of text fields etc, called 'frmEnquiry'.
I would like the form to be disabled (or the text fields, elements etc) when the checkbox is not enabled, and when ticked i would like it to be enabled.
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; }