Jump to content

is it possible to make the table colum resizable using php


php1

Recommended Posts

hi,

i tried this coding but its not working plz give some solution,

<a href="javascript:;" onClick="document.all.myTable.width+=5">zoom in</a>

<a href="javascript:;" onClick="document.all.myTable.width-=5">zoom out</a>

 

 

i don't have that script but i think that you can find it with google

 

http://www.google.ro/search?hl=ro&q=javascript+resize+table&btnG=C%C4%83utare+Google&meta=

Link to comment
Share on other sites

The coding given is only for when you click. I think what you're looking for is a drag/resize? That can be done, with a little bit of mathematical knowledge.

 

Just a basic way for you to get started is to look at something called Javascript Events, Event Handlers, etc...

 

Once you can figure out how to handle a click/drag event, it should be straightforward enough to determine the mouse's change in position horizontally and translate that to a change in column width.... This will take a bit of thinking (but what is convenient is that the top cell of the table is usually the cell that controls the width for that respective column, IE: using css to set a width to the top cell of a column will auto apply to other cells below it.)

 

Honestly, trying to get events to work has HUGE cross-browser issues as different browsers insist that they have the best way to handle events. In order to get a handle, try the following site (which I believe is an amazing piece of javascript).

 

http://www.walterzorn.com/dragdrop/dragdrop_e.htm

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.