Shrink Column 3    Grow Column 3

Valid XHTML 1.0 Transitional

Row num Short Col Sizeable Col
1 Alpha

I have heard that nothing gives an Author so great Pleasure, as to find his Works respectfully quoted by other learned Authors. This Pleasure I have seldom enjoyed; for tho' I have been, if I may say it without Vanity, an eminent Author of Almanacks annually now a full Quarter of a Century, my Brother Authors in the same Way, for what Reason I know not, have ever been very sparing in their Applauses; and no other Author has taken the least Notice of me, so that did not my Writings produce me some solid Pudding, the great Deficiency of Praise would have quite discouraged me.

I concluded at length, that the People were the best Judges of my Merit; for they buy my Works; and besides, in my Rambles, where I am not personally known, I have frequently heard one or other of my Adages repeated, with, as Poor Richard says, at the End on't; this gave me some Satisfaction, as it showed not only that my Instructions were regarded, but discovered likewise some Respect for my Authority; and I own, that to encourage the Practice of remembering and repeating those wise Sentences, I have sometimes quoted myself with great Gravity.

Judge then how much I must have been gratified by an Incident I am going to relate to you. I stopt my Horse lately where a great Number of People were collected at a Vendue of Merchant Goods. The Hour of Sale not being come, they were conversing on the Badness of the Times, and one of the Company call'd to a plain clean old Man, with white Locks, Pray, Father Abraham, what think you of the Times? Won't these heavy Taxes quite ruin the Country? How shall we be ever able to pay them? What would you advise us to?--- Father Abraham stood up, and reply'd, If you'd have my Advice, I'll give it you in short, for a Word to the Wise is enough, and many Words won't fill a Bushel, as Poor Richard says. They join'd in desiring him to speak his Mind, and gathering round him, he proceeded as follows;

2 Omega

``Friends, says he, and Neighbours, the Taxes are indeed very heavy, and if those laid on by the Government were the only Ones we had to pay, we might more easily discharge them; but we have many others, and much more grievous to some of us. We are taxed twice as much by our Idleness, three times as much by our Pride, and four times as much by our Folly, and from these Taxes the Commissioners cannot ease or deliver us by allowing an Abatement. However let us hearken to good Advice, and something may be done for us; God helps them that help themselves, as Poor Richard says, in his Almanack of 1733.

It would be thought a hard Government that should tax its People one tenth Part of their Time, to be employed in its Service. But Idleness taxes many of us much more, if we reckon all that is spent in absolute Sloth, or doing of nothing, with that which is spent in idle Employments or Amusements, that amount to nothing. Sloth, by bringing on Diseases, absolutely shortens Life. Sloth, like Rust, consumes faster than Labour wears, while the used Key is always bright, as Poor Richard says. But dost thou love Life, then do not squander Time, for that's the Stuff Life is made of, as Poor Richardsays.--How much more than is necessary do we spend in Sleep! forgetting that The sleeping Fox catches no Poultry, and that there will be sleeping enough in the Grave, as Poor Richard says. If Time be of all Things the most precious, wasting Time must be, as Poor Richard says, the greatest Prodigality, since, as he else where tells us, Lost Time is never found again; and what we call Time-enough, always proves little enough: Let us then up and be doing, and doing to the Purpose; so by Diligence shall we do more with less Perplexity. Sloth makes all Things difficult, but Industry all easy, as Poor Richard says; and He that riseth late, must trot all Day, and shall scarce overtake his Business at Night. While Laziness travels so slowly, that Poverty soon over- takes him, as we read in Poor Richard, who adds, Drive thy Business, let not that drive thee; and Early to Bed, and early to rise, makes a Man healthy, wealthy and wise.

[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => MikerRoo [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 4 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> adjust colujn width at browser. - Coldfusion - Advanced Techniques

adjust colujn width at browser. - Coldfusion - Advanced Techniques

Hi everyone, Is it possible to allow column resizing on the client side? I presume it will be done with javascript?? ie. set the columns to a default width, but allow the user to extend / shrink the column width to THEIR desired widths (think Excel spreadsheets) Thanks.....

  1. #1

    Default adjust colujn width at browser.

    Hi everyone,

    Is it possible to allow column resizing on the client side?

    I presume it will be done with javascript??

    ie. set the columns to a default width, but allow the user to extend / shrink
    the column width to THEIR desired widths (think Excel spreadsheets)

    Thanks..

    HeloWorld Guest

  2. #2

    Default Re: adjust colujn width at browser.

    Yes, this is possible but I don't have examples and I'm not going to write the
    code (until I need it).

    The best way is to set up a javascript event listener on the appropriate <th>
    tags (filtered by class).
    The listener would change the tags width attribute dynamicall based on the
    users mouse motion (or text input).

    It might be tricky getting it to act just like excel in a cross-browser way
    though.
    You would probably have to zero the table borders and create special columns
    of cells to act as pseudo borders.

    MikerRoo Guest

  3. #3

    Default Re: adjust colujn width at browser.

    Hi Mike, thanks for the reply,

    firstl;y there is no need for borders... but I understand what your talking
    about...

    The reason for this requirement is that I have a comments field (in the DB)
    with a width of 2000 characters.
    obviously I don't want to create a HTML table column of that size.

    So I just wanted the abaility for the user to be able to extend the html
    column width from the default of 300 pixels.

    HeloWorld Guest

  4. #4

    Default Re: adjust colujn width at browser.

    Well I had to kill some time and had a crack at it.

    See the attached for some working concept code. (no fancy event capture,
    mouse-drag, resizing).


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; cht=utf-8" />
    <!-- MikerRoo, See source safe for expanded (draft) version. -->
    <title>JS Col Resize fun</title>

    <script type="text/javascript">
    <!--//
    function jsChangeColumnSize (sTH_CellID, iDeltaAmount)
    {
    var zTargetCell = doent.getElementById (sTH_CellID);
    var iCurrentWidth = zTargetCell.clientWidth;

    iNewWidth = (iCurrentWidth - 0) + iDeltaAmount;
    zTargetCell.width = iNewWidth;

    if (doent.all)
    {
    var aAllCells = doent.getElementsByTagName ('td');
    var iNumCells = aAllCells.length;
    var sTargetClassName = 'MakeWidthWorkInPOS_IE';

    for (var K = 0; K < iNumCells; K++)
    {
    var zCell = aAllCells[K];
    if (zCell.className && (' ' + zCell.className + '
    ').indexOf (' ' + sTargetClassName + ' ') != -1)
    zCell.style.width = iNewWidth;
    }
    }
    }
    //-->
    </script>
    <style type="text/css">
    <!--
    table
    {
    border: 1px solid #0000CC;
    border-collapse: collapse;
    }
    th
    {
    padding: 4px;
    text-align: left;
    vertical-align: top;
    border: 1px solid #0000CC;
    }
    td
    {
    padding: 4px;
    text-align: left;
    vertical-align: top;
    border: 1px solid #0000CC;
    }
    td.MakeWidthWorkInPOS_IE
    {
    width: 400px;
    }
    p
    {
    margin-top: 0;
    }
    -->
    </style>
    </head>

    <body>
    <p>
    <a href="javascript:jsChangeColumnSize('SizeableCell' ,-40);"
    name="hlMakeSmaller">
    Shrink Column 3
    </a>
    &nbsp;&nbsp;
    <a href="javascript:jsChangeColumnSize('SizeableCell' ,40);"
    name="hlMakeBigger">
    Grow Column 3
    </a>
    </p>
    <p>
    <a href="http://validator.w3.org/check?uri=referer"><img
    src="http://www.w3.org/Icons/valid-xhtml10"
    alt="Valid XHTML 1.0 Transitional" height="31" width="88" border="0" />
    </a>
    </p>
    <table>
    <tr>
    <th scope="col">Row num </th>
    <th scope="col">Short Col</th>
    <th scope="col" id="SizeableCell"
    class="MakeWidthWorkInPOS_IE">Sizeable Col</th>
    </tr>
    <tr>
    <td>1</td>
    <td >Alpha</td>
    <td class="MakeWidthWorkInPOS_IE">
    <p>
    I have heard that nothing gives an Author so great Pleasure,
    as to find his Works respectfully quoted by other learned Authors. This
    Pleasure I have seldom enjoyed; for tho' I have been, if I may say it without
    Vanity, an eminent Author of Almanacks annually now a full Quarter of a
    Century, my Brother Authors in the same Way, for what Reason I know not, have
    ever been very sparing in their Applauses; and no other Author has taken the
    least Notice of me, so that did not my Writings produce me some solid Pudding,
    the great Deficiency of Praise would have quite discouraged me.
    </p>
    <p>
    I concluded at length, that the People were the best Judges of
    my Merit; for they buy my Works; and besides, in my Rambles, where I am not
    personally known, I have frequently heard one or other of my Adages repeated,
    with, as Poor Richard says, at the End on't; this gave me some Satisfaction, as
    it showed not only that my Instructions were regarded, but discovered likewise
    some Respect for my Authority; and I own, that to encourage the Practice of
    remembering and repeating those wise Sentences, I have sometimes quoted myself
    with great Gravity.
    </p>
    <p>
    Judge then how much I must have been gratified by an Incident
    I am going to relate to you. I stopt my Horse lately where a great Number of
    People were collected at a Vendue of Merchant Goods. The Hour of Sale not being
    come, they were conversing on the Badness of the Times, and one of the Company
    call'd to a plain clean old Man, with white Locks, Pray, Father Abraham, what
    think you of the Times? Won't these heavy Taxes quite ruin the Country? How
    shall we be ever able to pay them? What would you advise us to?--- Father
    Abraham stood up, and reply'd, If you'd have my Advice, I'll give it you in
    short, for a Word to the Wise is enough, and many Words won't fill a Bushel, as
    Poor Richard says. They join'd in desiring him to speak his Mind, and gathering
    round him, he proceeded as follows;
    </p>
    </td>
    </tr>
    <tr>
    <td>2</td>
    <td>Omega</td>
    <td class="MakeWidthWorkInPOS_IE">
    <p>
    ``Friends, says he, and Neighbours, the Taxes are indeed very
    heavy, and if those laid on by the Government were the only Ones we had to pay,
    we might more easily discharge them; but we have many others, and much more
    grievous to some of us. We are taxed twice as much by our Idleness, three times
    as much by our Pride, and four times as much by our Folly, and from these Taxes
    the Commissioners cannot ease or deliver us by allowing an Abatement. However
    let us hearken to good Advice, and something may be done for us; God helps them
    that help themselves, as Poor Richard says, in his Almanack of 1733.
    </p>
    <p>
    It would be thought a hard Government that should tax its
    People one tenth Part of their Time, to be employed in its Service. But
    Idleness taxes many of us much more, if we reckon all that is spent in absolute
    Sloth, or doing of nothing, with that which is spent in idle Employments or
    Amusements, that amount to nothing. Sloth, by bringing on Diseases, absolutely
    shortens Life. Sloth, like Rust, consumes faster than Labour wears, while the
    used Key is always bright, as Poor Richard says. But dost thou love Life, then
    do not squander Time, for that's the Stuff Life is made of, as Poor
    Richardsays.--How much more than is necessary do we spend in Sleep! forgetting
    that The sleeping Fox catches no Poultry, and that there will be sleeping
    enough in the Grave, as Poor Richard says. If Time be of all Things the most
    precious, wasting Time must be, as Poor Richard says, the greatest Prodigality,
    since, as he else where tells us, Lost Time is never found again; and what we
    call Time-enough, always proves little enough: Let us then up and be doing, and
    doing to the Purpose; so by Diligence shall we do more with less Perplexity.
    Sloth makes all Things difficult, but Industry all easy, as Poor Richard says;
    and He that riseth late, must trot all Day, and shall scarce overtake his
    Business at Night. While Laziness travels so slowly, that Poverty soon over-
    takes him, as we read in Poor Richard, who adds, Drive thy Business, let not
    that drive thee; and Early to Bed, and early to rise, makes a Man healthy,
    wealthy and wise.
    </p>
    </td>
    </tr>
    </table>
    </body>
    </html>

    MikerRoo Guest

Similar Threads

  1. Adjust browser window ?
    By Peter Fettes in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: January 13th, 02:06 PM
  2. 100% browser width
    By pro-fyle in forum Macromedia Flash Sitedesign
    Replies: 4
    Last Post: November 30th, 10:22 PM
  3. How do I set Browser Window to exact width of SWF?
    By karltraum in forum Macromedia Flash Sitedesign
    Replies: 2
    Last Post: September 20th, 03:55 AM
  4. Adjust width to fit for text members
    By rick@mcorp webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 4
    Last Post: November 6th, 10:57 AM
  5. Expand width of Browser
    By jdawgomedia webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 6
    Last Post: October 9th, 08:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •