Results 1 to 3 of 3

Thread: Div with scrollbars (Dynamic Scrollbar/ DHTML scrollbars)

  1. #1
    Join Date
    Oct 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Div with scrollbars (Dynamic Scrollbar/ DHTML scrollbars)

    Hey,

    i have this list
    <dl>
    ....
    <dt>title</dt>
    <dd>data</dd>
    ....
    </dl>

    i want ot put a div with a scrollbar in a <dd></dd> like for third employees,
    cuz sometimes the list is very long and i dont want a very huge page length.

    iframe dont seem to work cuz i need a src="", and i also use ajax on this page.

    <dl>
    <dt>Creator</dt>
    <dd>Brutyn Luc</dd>

    <dt><label for="client_company_id">Client company</label></dt>
    <dd>
    <!-- For creating, we select the first value -->
    <!-- When there is a validation error, we select the value from the paramater -->
    <select id="client_company_id" name="client_company_id">
    <option value="2" selected="selected">aaaa nv</option>
    <option value="3">bbbb nv</option>
    <option value="1">Twodecode NV/SA</option>
    </select>
    <span id="indicator1" style="display:none;">
    <img alt="Spinner" src="/images/spinner.gif" /> Loading...
    </span>
    </dd>

    <dt><label for="third_employee_list">Third employees</label></dt>
    <dd>
    <!-- For creating, we select the first value -->
    <!-- When there is a validation error, we select the value from the paramater -->

    =====>>>>> HERE I WANT A SCROLL BAR
    <b>den test vb</b>:<br/>
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="6" />ddddd dddd
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="1" />den test wk 1 aaa
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="3" />eeeee eeeee
    <br/>
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="4" />eeeee fffffff
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="5" />ffffffff dddd
    <br/>
    <b>gggg gggg</b>:<br/>
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="11" />ddd ddd
    <br/>
    <b>hhhhhhhhhhhhhh qs</b>:<br/>
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="12" />hhhhhhh 111111
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="13" />hhhhhhh 222222
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="14" />hhhhhhh 333333
    <br/>
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="15" />hhhhhhh 444444
    <br/>
    <b>OCMW wzv</b>:<br/>
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="16" />OWCM 111111
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="17" />OWCM 22222
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="18" />OWCM 33333
    <br/>
    <input type="checkbox" name="third_employee_list[]" id="third_employee_list" value="19" />OWCM 4444
    <br/>
    </dd>
    </dl>

    i saw something on http://www.dyn-web.com/dhtml/scroll/scroll-multi.html
    but i cant get it to work :s:s

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,944
    Thanks
    43
    Thanked 3,193 Times in 3,156 Posts
    Blog Entries
    12

    Default

    I'm not sure about those <dd> and <dl> tags but, all you need to do is put a division around your content. Set its dimensions and overflow:auto in its style:

    HTML Code:
    <div style="width:300px;height:250px;overflow:auto;">
    
    content goes here
    
    </div>
    Then if the content is too tall, there will be a vertical scrollbar. If the content is too wide and cannot wrap, there will be a horizontal scrollbar.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Oct 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thx it works

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
  •