[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.6

how to hide the background area on jsp

Asked by manojvashisht in Java Server Pages (JSP), JavaScript, Asynchronous Javascript and XML (AJAX)

Tags: CSS

hi
i am facing a problem in jsp div display,on my jsp on click of icon i show a div which greys out the remaining portion of page the problems i am facing is
1) when div appears the page greys out but the drop down with multi select option are still visible as usual,i.e there is no effect of greying on them.how to solve this
2) i want to disable the control on all the fields except div fields on the page.but the problem is when i disable the same the text box and buttons are not enabled back i have attached the code for same.

i have attached the code please update what additions i need to make to grey out all the fields including drop downs and disable the controls on them.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
<html>
  <head>
 <style type="text/css">
#cover{position:absolute;top:0px;left:0px;overflow:hidden;display:none;width:100%;height:100%;background-color:lightgrey;opacity:1.0;MozOpacity:0.9;zIndex:5;filter:alpha(opacity=90);text-align:center}
#warning{margin:auto;position:relative;width:300px;height:200px;background-color:White;color:red;padding:5px;zIndex:100;}
</style> 
 <script>
 
 function disableAllFields(){
	for (j=0 ; j < document.forms.length ; ++j) 
		{
		  for (i=0 ; i < document.forms[j].elements.length ; ++i) 
		  {
		 
			  if((document.forms[j].elements[i].type == "text") ){
				  var nm = document.forms[j].elements[i].name;
					
					document.forms[j].elements[i].readOnly=true;
				  
 
			  }else
			  if ((document.forms[j].elements[i].type == "text")||(document.forms[j].elements[i].type == "radio") || (document.forms[j].elements[i].type == "select-multiple") || (document.forms[j].elements[i].type == "select-one") || (document.forms[j].elements[i].type == "checkbox")|| (document.forms[j].elements[i].type == "textarea"))  
			  document.forms[j].elements[i].zIndex=-100;
			  document.forms[j].elements[i].disabled = true;
			  
			 //  document.forms[j].style.visibility="hidden";
		  }
		}
	return;
}
 
function enableAllFields(){
	for (j=0 ; j < document.forms.length ; ++j) 
		{
		  for (i=0 ; i < document.forms[j].elements.length ; ++i) 
		  {
		 
			  if((document.forms[j].elements[i].type == "text") ){
				  var nm = document.forms[j].elements[i].name;
					
					document.forms[j].elements[i].readOnly= false;
				  
 
			  }else
			  if (	(document.forms[j].elements[i].type == "radio") || 
			  		(document.forms[j].elements[i].type == "select-multiple") || 
			  		(document.forms[j].elements[i].type == "select-one") || 
			  		(document.forms[j].elements[i].type == "checkbox")|| 
			  		(document.forms[j].elements[i].type == "textarea") ||
			  		(document.forms[j].elements[i].type == "text"))  
			  document.forms[j].elements[i].disabled = false;
			  // document.forms[j].style.visibility="visible";
		  }//for i
		}//for j
	return;
}
 var vis=1;
function cover() 
{  
 
	var cover=document.getElementById('cover');
 
	if(vis)
	{
		vis=0;
		cover.style.display='block';      
	} 
	else 
	{   
		vis=1;
		cover.style.display='none'; 
	}
 
}
 
 
if( typeof XMLHttpRequest == "undefined" ) XMLHttpRequest = function() {
        try { return new ActiveXObject("Msxml2.XMLHTTP.6.0") } catch(e) {}
        try { return new ActiveXObject("Msxml2.XMLHTTP.3.0") } catch(e) {}
        try { return new ActiveXObject("Msxml2.XMLHTTP") } catch(e) {}
        try { return new ActiveXObject("Microsoft.XMLHTTP") } catch(e) {}
        throw new Error( "This browser does not support XMLHttpRequest." )
};
 
window.onload = function() {
 // alert("inside onload function");
        // updates every 2.5 seconds
        var msBeforeUpdate = 10000;
        setInterval("checkMe()", msBeforeUpdate);
 
}
 
 function checkMe() {
 // alert("inside check me");
        var request =  new XMLHttpRequest();
        var params = "recordIcon=" + recordIcon.src;
   
    serverUrl = encodeURI(serverUrl + "?" + params);
        
        var serverUrl = "<%=request.getContextPath()%>" + "/NotifyAction.do";
        serverUrl = encodeURI(serverUrl + "?" + params);
        // alert("server url"+serverUrl);
        request.onreadystatechange = function() {
                if(request.readyState == 4 ) {
 
                        // toggles based on returned value
                        //toggleIcon(parseInt(request.responseText) > 0);
                        var res = request.responseText.replace(/(^\s+|\s+$)/g,'');
                        var target ="<valid>true</valid>";
                        
                       //  alert("%%%%%%%%%%%%%%"+request.responseText);
                        if(res== target)
                        {
                                toggleIcon(true);
                                }
                        else 
                        {
                        toggleIcon(false);
                        }
                }
        };
       //  alert("outside servlet call");
        request.open("GET", serverUrl);
        request.send(null);
 
}
 
 function ShowAlerts() {
 // alert("inside check me");
        var request =  new XMLHttpRequest();
        var params = "time";
   
   var cover=document.getElementById('cover');
   
          
        var serverUrl = "<%=request.getContextPath()%>" + "/NotificationListAction.do";
        serverUrl = encodeURI(serverUrl + "?" + params);
        // alert("server url"+serverUrl);
        request.onreadystatechange = function() {
                if(request.readyState == 4 ) {
 					var divData = request.responseText;
 					 alert("%%%%%%%%%%%%%%%%%%%%%"+divData);
                        // toggles based on returned value
                        //toggleIcon(parseInt(request.responseText) > 0);
                        var res = request.responseText.replace(/(^\s+|\s+$)/g,'');
                        var cover=document.getElementById('cover');
                        document.getElementById("alertTable").innerHTML = request.responseText;   
                       
                        
                       //  alert("%%%%%%%%%%%%%%"+request.responseText);
                      
                }
        };
       //  alert("outside servlet call");
        request.open("GET", serverUrl);
        request.send(null);
 
}
 
 
 
 
function showRecords() {
 var alertWin = "<%=request.getContextPath()%>" + "/inc/Notification.jsp";
//  alert("##########"+alertWin);
        if(window.showModalDialog) {
                window.showModalDialog(alertWin, "records",
                "dialogWidth: 600px; dialogHeight: 400px");
        } else {
                window.open(alertWin, "records","height=600,width=400,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes");
        }
 
} 
 
function toggleIcon(stat) {
 
        var recordIcon = document.getElementById("recordIcon");
 
        if(stat) recordIcon.src = "img/new.png";
        else recordIcon.src = "img/no_new.png";
 
}
 
</script>
 
 
 </head>
 
 
  
<img id="recordIcon" src="img/no_new.png" onClick="javascript:disableAllFields();cover();ShowAlerts();" />
 
<!--    <input type="button" onclick="javascript:disableAllFields();cover();" value="fade now" />-->
 
<div id="cover" style="z-index:5" dir="ltr">
 
	<div id="warning" style="z-index: 5" dir="ltr">
	Mantas Alerts
	
	<span id="alertTable"></span>
	<p align="center">
	<input type="button" onclick="javascript:enableAllFields();cover();" value="clear" /> 
	
	</p>
	</div>
 
</div>
  
  </html>
 
Related Solutions
Keywords: how to hide the background area on jsp
 
Loading Advertisement...
 
[+][-]02/24/09 12:13 AM, ID: 23719282Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/24/09 12:24 AM, ID: 23719310Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/24/09 12:37 AM, ID: 23719369Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/24/09 12:40 AM, ID: 23719382Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/24/09 01:15 AM, ID: 23719539Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/24/09 01:32 AM, ID: 23719643Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/24/09 01:57 AM, ID: 23719772Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/24/09 02:08 AM, ID: 23719846Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Java Server Pages (JSP), JavaScript, Asynchronous Javascript and XML (AJAX)
Tags: CSS
Sign Up Now!
Solution Provided By: mahome
Participating Experts: 2
Solution Grade: B
 
[+][-]02/24/09 02:28 AM, ID: 23719950Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/24/09 02:42 AM, ID: 23720022Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/24/09 02:51 AM, ID: 23720070Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/24/09 05:46 AM, ID: 23721327Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/24/09 08:32 PM, ID: 23730287Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/24/09 08:44 PM, ID: 23730330Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/24/09 09:28 PM, ID: 23730506Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/24/09 10:27 PM, ID: 23730764Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/25/09 07:21 PM, ID: 23741254Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/25/09 08:58 PM, ID: 23741688Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/25/09 11:02 PM, ID: 23742183Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/25/09 11:09 PM, ID: 23742221Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/25/09 11:32 PM, ID: 23742332Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/25/09 11:41 PM, ID: 23742360Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/26/09 01:48 AM, ID: 23742981Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/26/09 02:10 AM, ID: 23743078Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/26/09 02:14 AM, ID: 23743096Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/26/09 02:40 AM, ID: 23743239Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/26/09 05:09 PM, ID: 23751807Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/26/09 09:09 PM, ID: 23752880Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625