Jump to content

is it possible to make the table colum resizable using php


php1

Recommended Posts

<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=

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=

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.