php1 Posted August 28, 2008 Share Posted August 28, 2008 Dear all, Is there any way to make the colums in the table resizable? like microsoft outlook and all. Quote Link to comment Share on other sites More sharing options...
alin19 Posted August 28, 2008 Share Posted August 28, 2008 i think it is posible with java script, Quote Link to comment Share on other sites More sharing options...
php1 Posted August 28, 2008 Author Share Posted August 28, 2008 can you please paste the javascript code to resize the table Quote Link to comment Share on other sites More sharing options...
alin19 Posted August 28, 2008 Share Posted August 28, 2008 <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= Quote Link to comment Share on other sites More sharing options...
php1 Posted August 28, 2008 Author Share Posted August 28, 2008 thank u so much. I will try it out and will be back with the result Quote Link to comment Share on other sites More sharing options...
budimir Posted August 28, 2008 Share Posted August 28, 2008 You can try using non fixed width. For example: Instead of - witdth:"250" Use - width:"90%" ??? Quote Link to comment Share on other sites More sharing options...
veluit06 Posted August 28, 2008 Share Posted August 28, 2008 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= Quote Link to comment Share on other sites More sharing options...
kratsg Posted August 28, 2008 Share Posted August 28, 2008 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 Quote Link to comment Share on other sites More sharing options...
php1 Posted August 29, 2008 Author Share Posted August 29, 2008 thank you for the reply. now i gt some idea on how to implement it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.