SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hiding and showing....

    I'm creating a form that has many values and most of the values are not needed to be filled in all the time... example.
    Attached Images Attached Images

  2. #2
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok i got the perfect example....
    See the '-' button above our usernames? click on it and it hides the box.

    Is there a script out there that does this?

    Thank you.

  3. #3
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    better yet. Any tutorials out there? I viewed source and it seems it uses Javascript and the Div tag...

  4. #4
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found this script on the source of this page
    PHP Code:
    function expand(listID) {
            if (
    listID.style.display=="none") {
                    
    listID.style.display="";
            }
            else {
                    
    listID.style.display="none";
            }
            
    window.event.cancelBubble=true;
    }
    function 
    contract(listID) {
            if (
    listID.style.display=="show") {
                    
    listID.style.display="";
            }
            else {
                    
    listID.style.display="none";
            }
            
    window.event.cancelBubble=true;

    Can anyone enlighten me as to what cancelBubble is? =D

  5. #5
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    simple

    Stops the event from bubling up the event hierarchy:

    False:
    ======
    Bubbling is enabled, allowing the next event handler in the hierarchy to receive the event.

    True:
    =====
    Bubbling is disabled for this event, preventing the next event handler in the hierarchy from receiving the event.


    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---


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
  •