Solved

Could you point how to disable all the combobox of a modal view at the same time?

Posted on 2016-10-20
7
58 Views
Last Modified: 2016-10-20
Hi Experts

Could you point how to disable all the combobox of a modal view at the same time?

 $('#view input').prop("disabled", false);  // Runs OK for all inputs
 $('#view select.dropdown').attr('disabled', false); // It doesn't runs for combos.

Open in new window


Thanks in advance
0
Comment
Question by:Eduardo Fuerte
  • 3
  • 3
7 Comments
 
LVL 52

Expert Comment

by:Julian Hansen
ID: 41851971
$('#view select.dropdown').attr('disabled', false);

Open in new window

This will only act on <select> with class "dropdown"
<div id="view">
  <select class="dropdown"></select> <!--YES -->
  <select></select> <!-- No -->
</div>

Open in new window

0
 

Author Comment

by:Eduardo Fuerte
ID: 41851984
Could you sugest somtehing these cases:

<span class="select">          
	<select id="fk_seguradora" name="fk_seguradora">                 
		<option value="" selected="selected">...Cliente Corporativo...</option>
		<option value="1">XXXXX</option>
		<option value="2">YYYYY</option>
		<option value="3">ZZZZZ</option>
	</select>
</span>


 <div class="col-xs-8 mb15">
	<label for="fk_nome_produto" class="field-label text-muted mb10">Nome do Produto</label>
	<label for="fk_nome_produto" class="validar field select">
		<?php echo $fk_nome_produto;?>
		<i class="arrow double"></i>
	</label>
</div>

Open in new window

0
 
LVL 52

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 41852030
Assuming the above is inside the #view you mentioned earlier then

$('#view .select select').prop('disabled',true)

Open in new window


Note in your opening code you had .prop('disabled',false) - your question says you want to disable the <select> which means you should be using a value of true not false?
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 108

Expert Comment

by:Ray Paseur
ID: 41852056
No points for this please, but there is a thing called semantic markup.  It refers to the use of meaningful and intentional names for data elements.  If you name a <span> with a meaningless word like "select" you're violating the concepts of semantics, and this leads to confusion when other people (or you, if you come back to this work a few days later) try to understand your intent.  A better practice is to think about the meaning of each data element in the browser viewport.  Give meaningful names to these data elements, and it will help you organize your thinking about the user-experience you're trying to produce.
0
 

Author Closing Comment

by:Eduardo Fuerte
ID: 41852403
Yes, for disable.

Runs perfectly.

Thank you!
0
 

Author Comment

by:Eduardo Fuerte
ID: 41852407
@Ray

Thanks for advice.
I can sugest to adopt another more adequated word.
0
 
LVL 52

Expert Comment

by:Julian Hansen
ID: 41852447
You are welcome.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now