/    Sign up×
Community /Pin to ProfileBookmark

Table with moving sides

I have a fixed table with one row and two colonms. i want to be able to move the line between the two colomns. IE: change the width of the two boxes.

does anyone know how to do this?

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@jzwpJan 18.2006 — [code=php]
<HTML>
<HEAD><TITLE>In a cell</TITLE>
<SCRIPT type="text/javascript">
k=10;
function moveIt(){
if(cell1.style.width!='490px'){k++;cell1.style.width=k+'px';setTimeout("moveIt()",20)}
}
</SCRIPT>
</HEAD>
<BODY bgcolor="#ccFFCC">
<button onclick="moveIt()">click</button><p>
<TABLE BORDER="1" style="width:500px">
<TBODY>
<TR>
<TD id="cell1" style="width:10px;background:blue"> @ </TD>
<TD align="center"> The walls are closing in on me! </TD>
</TR>
</TBODY>
</TABLE>
</BODY></HTML>
[/code]
Copy linkTweet thisAlerts:
@kiwisauthorJan 18.2006 — I want something I can click and drag... can this be done??
Copy linkTweet thisAlerts:
@jzwpJan 18.2006 — I have a drag script I use as an utility so,

I took all the cross-browser extra code out of it.

It only works in IE
Copy linkTweet thisAlerts:
@kiwisauthorJan 19.2006 — That's okay it's only for my own use on a email script i'm making...

any chance or sharing the code?
Copy linkTweet thisAlerts:
@jzwpJan 19.2006 — I thought about it.

It might have a chance if you would choose to use DIVs

rather then TableCells.
Copy linkTweet thisAlerts:
@kiwisauthorJan 19.2006 — Well that's possible... are you able to give it a crack for me??
Copy linkTweet thisAlerts:
@jzwpJan 19.2006 — Nah, whatever I do it won't be what you want. It turns into alot of work.

Find a drag script and pick through the code, rearrange it until you get it doing what you want. ?
×

Success!

Help @kiwis spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...