[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!

9.3

Radio Buttons not working with Show/Hide Div

Asked by Pdesignz in JavaScript, Hypertext Markup Language (HTML), Asynchronous Javascript and XML (AJAX)

Tags: javascript, AJAX, html

Hello,

I have a problem with radio buttons and divs that I am show/hide upon click of rdio button. I have a set of radio buttons and two divs, one is shown and one is hidden. Upon clicking radio buttons, they show and hide the proper divs and display the proper checked function of the radio button. If you go back and click the original radio button, the divs change, but the checked state of the radio button does not display properly...
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:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Attach a Document</title>
<script type="text/javascript">
	
 
function hide(id){
	document.getElementById(id).style.display='none';
}
function show(id){
	document.getElementById(id).style.display='';//'block'
}</script>
 
<style type="text/css">
<!--
#pageHeader { color: #FF9900; height: 18px; padding-top: 3px; padding-bottom: 3px; margin-top: 5px; margin-left: 5px; vertical-align: middle; text-align:left; font: bold 16px Arial, Helvetica, sans-serif; margin-bottom: 20px; }
#container ul { list-style: none; padding: 3px; margin: 0px; }
#upload table { margin-left: auto; margin-right: auto; width: 700px; }
#container { font-family: Arial, Helvetica, sans-serif; width: 900px; }
#options { width: 610px; margin-right: auto; margin-left: auto; font-weight: bold; }
#upload { width: 700px; margin-right: auto; margin-left: auto; font-weight: bold; }
#container li { display: inline; margin-right: 25px; }
/*#textfield { font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #000000; height: 15px; border: 1px solid #6699CC; }*/
.dataHeader { font-weight: bold; color: #000000; line-height: 22px; text-indent: 2px; vertical-align: middle; text-align: left; background-color: #C3DEF9; padding: 1px; }
#upload table { font-weight: normal; }
 
-->
</style>
<link href="../HFPM_hybrid.css" rel="stylesheet" type="text/css" />
</head>
 
<body>
 
<div id="container">
<div id="pageHeader">Attach a Document</div>
 
 
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
  <div id="options">
    <div style="margin-left:auto; margin-right:auto; width:610px; margin-bottom:20px;" class="instructions" >
  <ul>
  <li>  <input name="radio" type="radio" id="radio" checked="checked" onclick="hide('upload');show('options')" />
  Browse your  computer and upload a file</li>
  <li>   -OR- </li>
  <li>  <input type="radio" name="radio" id="radio2" onclick="hide('options');show('upload')" />
  Select a file from your document library </li>
  </ul>
  </div>
  <table cellpadding="1" cellspacing="1" style="width:450px; margin-left:10px;">
  <tr>
    <td>File Location</td>
    <td><input type="file" name="fileField" id="fileField" /></td>
  </tr>
  <tr>
    <td>Document Type</td>
    <td><select name="select" id="select" style="width:200px;">
      <option>Patient Form</option>
    </select>
    </td>
  </tr>
  <tr>
    <td>Title</td>
    <td><input name="textfield2" type="text" class="formfield" id="textfield2" style="width:250px;" value="Family History Form" /></td>
  </tr>
  <tr>
    <td>Document Date</td>
    <td><input name="textfield3" type="text" class="formfield" id="textfield3" value="04/28/2009" />
      <img src="../images/icon_calendar.png" width="18" height="16" /></td>
  </tr>
  <tr>
    <td>Review Required</td>
    <td><select name="select2" id="select2" style="width:200px;">
      <option>NO REVIEW REQUIRED</option>
      <option selected="selected">JOHNSON, JACK</option>
      <option>SMITH, MIKE</option>
    </select>
    </td>
  </tr>
</table>
<div style="background-color:#e5e5e5; margin-top:25px;">
    <div style="margin-left:auto; margin-right:auto; width:150px; padding-top:10px; padding-bottom:10px;">
    <input name="button3" type="button" class="frmButton" id="button3" value="Upload" />
    <input name="button4" type="button" class="frmButton" id="button4" value="Cancel" onclick="javascript:window.close();" />
    </div>
  </div>
</div>
 
<div id="upload" style="display:none;">
  <div style="margin-left:auto; margin-right:auto; width:610px; margin-bottom:20px;" class="instructions" >
  <ul>
  <li>  
    <input type="radio" name="radio2" id="radio3" onclick="hide('upload');show('options')" />
    Browse your  computer and upload a file</li>
  <li>   -OR- </li>
  <li>
<input name="radio2" type="radio" id="radio4" checked="checked" onclick="hide('options');show('upload')" />    
Select a file from your document library </li>
  </ul>
  </div>
  <table cellspacing="1" cellpadding="1">
  <tr>
    <td colspan="7" style="text-align:right"><strong>Filter by:</strong>      <select name="select3" id="select3">
        <option>ALL DOCUMENT TYPES</option>
      </select></td>
    </tr>
  <tr>
    <td align="center" style="background-color:#C3DEF9"><input name="checkbox" type="checkbox" id="checkbox" /></td>
    <td class="dataHeader">Title</td>
    <td class="dataHeader">Document Type</td>
    <td class="dataHeader">Review Required</td>
    <td class="dataHeader">Document Date</td>
    <td width="75" class="dataHeader">Size</td>
    <td class="dataHeader">Upload Date</td>
  </tr>
  <tr>
    <td align="center" class="datacell"><input type="checkbox" name="checkbox2" id="checkbox2" /></td>
    <td class="datacell">Family History Form - 00123</td>
    <td class="datacell">PATIENT FORM</td>
    <td class="datacell">JOHNSON, JACK</td>
    <td class="datacell">04/28/2009</td>
    <td class="datacell">233 KB</td>
    <td class="datacell">04/28/2009</td>
  </tr>
  <tr>
    <td align="center" class="datacell2"><input type="checkbox" name="checkbox3" id="checkbox3" /></td>
    <td class="datacell2">LABCORP_06542335987</td>
    <td class="datacell2">LAB RESULT</td>
    <td class="datacell2">SMITH, MIKE</td>
    <td class="datacell2">04/28/2009</td>
    <td class="datacell2">1.4 MB</td>
    <td class="datacell2">04/28/2009</td>
  </tr>
  <tr>
    <td align="center" class="datacell"><input type="checkbox" name="checkbox4" id="checkbox4" /></td>
    <td class="datacell">Care Plan - Diabetes Type I</td>
    <td class="datacell">TEMPLATE</td>
    <td class="datacell">NOT REQUIRED</td>
    <td class="datacell">&nbsp;</td>
    <td class="datacell">186 KB</td>
    <td class="datacell">04/28/2009</td>
  </tr>
  <tr>
    <td align="center" class="datacell2"><input type="checkbox" name="checkbox5" id="checkbox5" /></td>
    <td class="datacell2">Family History Form - 00124</td>
    <td class="datacell2">PATIENT FORM</td>
    <td class="datacell2">SMITH, MIKE</td>
    <td class="datacell2">04/27/2009</td>
    <td class="datacell2">233 KB</td>
    <td class="datacell2">04/27/2009</td>
  </tr>
  <tr>
    <td align="center" class="datacell"><input type="checkbox" name="checkbox6" id="checkbox6" /></td>
    <td class="datacell">HIPAA Consent - 006543</td>
    <td class="datacell">PATIENT FORM</td>
    <td class="datacell">NOT REQUIRED</td>
    <td class="datacell">04/27/2009</td>
    <td class="datacell">233 KB</td>
    <td class="datacell">04/27/2009</td>
  </tr>
  <tr>
    <td align="center" class="datacell2"><input type="checkbox" name="checkbox7" id="checkbox7" /></td>
    <td class="datacell2">Family History Form - 00120</td>
    <td class="datacell2">PATIENT FORM</td>
    <td class="datacell2">JOHNSON, JACK</td>
    <td class="datacell2">04/26/2009</td>
    <td class="datacell2">233 KB</td>
    <td class="datacell2">04/26/2009</td>
  </tr>
</table>
 
<div style="background-color:#e5e5e5; margin-top:25px;">
    <div style="margin-left:auto; margin-right:auto; width:160px; padding-top:10px; padding-bottom:10px;">
    <input name="button3" type="button" class="frmButton" id="button3" value="Attach Selected" style="width:100px;" />
    <input name="button4" type="button" class="frmButton" id="button4" value="Cancel" onclick="javascript:window.close();" />
    </div>
  </div>
 
  </div>
</form>
</div>
</body>
</html>
[+][-]05/11/09 03:06 PM, ID: 24359527Accepted 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: JavaScript, Hypertext Markup Language (HTML), Asynchronous Javascript and XML (AJAX)
Tags: javascript, AJAX, html
Sign Up Now!
Solution Provided By: GregTSmith
Participating Experts: 1
Solution Grade: A
 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625