Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing div position

Status
Not open for further replies.

thysonj

Programmer
Jul 6, 2001
240
US
is it possible to change the position of a div? For example
Code:
<tr>
						<td>Field1 <input type=&quot;checkbox&quot; name=&quot;test&quot; value=&quot;1&quot; onclick=&quot;toggleDiv('a', this.checked);&quot;></td>
						<td rowspan=&quot;7&quot;>
							<div id=&quot;background&quot; style=&quot;background-color:cccccc;width:100;&quot;>
								<div id=&quot;a&quot; style=&quot;display:none;&quot;>aaa<br></div>
								<div id=&quot;b&quot; style=&quot;display:none;&quot;>bbb<br></div>
								<div id=&quot;c&quot; style=&quot;display:none;&quot;>ccc<br></div>
								<div id=&quot;d&quot; style=&quot;display:none;&quot;>ddd<br></div>
								<div id=&quot;e&quot; style=&quot;display:none;&quot;>eee<br></div>
								<div id=&quot;f&quot; style=&quot;display:none;&quot;>fff<br></div>
							</div>
						</td>
					</tr>
					<tr>
						<td>Field1 <input type=&quot;checkbox&quot; name=&quot;test&quot; value=&quot;1&quot; onclick=&quot;toggleDiv('b', this.checked);&quot;></td>
					</tr>
					<tr>
						<td>Field1 <input type=&quot;checkbox&quot; name=&quot;test&quot; value=&quot;1&quot; onclick=&quot;toggleDiv('c', this.checked);&quot;></td>
					</tr>
					<tr>
						<td>Field1 <input type=&quot;checkbox&quot; name=&quot;test&quot; value=&quot;1&quot; onclick=&quot;toggleDiv('d', this.checked);&quot;></td>
					</tr>
					<tr>
						<td>Field1 <input type=&quot;checkbox&quot; name=&quot;test&quot; value=&quot;1&quot; onclick=&quot;toggleDiv('e', this.checked);&quot;></td>
					</tr>
					<tr>
						<td>Field1 <input type=&quot;checkbox&quot; name=&quot;test&quot; value=&quot;1&quot; onclick=&quot;toggleDiv('f', this.checked);&quot;></td>
					</tr>

When a user checks a checkbox a certain div will appear. If all checkboxed are checked the results look something like this.
Code:
aaa
bbb
ccc
ddd
eee
fff

Id' like to be able to then change the above order if need to be. to something like this
aaa
ccc
eee
ddd
fff
bbb

Is this possible?
 
I think this is possible, but using javascript. Post this question to javascript forum, I'm quite sure they will get a solution for you.

Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top