SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict AHMED's Avatar
    Join Date
    Oct 2002
    Location
    Egypt
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    script with default value

    hi all i got this nice script from nice web site
    Code:
    <html>
    <head>
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>ahmed</title>
    <!-- flooble Expandable Content header start -->
    <script language="javascript">
    // Expandable content script from flooble.com.
    // For more information please visit:
    //   http://www.flooble.com/scripts/expand.php
    // Copyright 2002 Animus Pactum Consulting Inc.
    //----------------------------------------------
    var ie4 = false; if(document.all) { ie4 = true; }
    function getObject(id) { if (ie4) { return document.all[id]; } else { return document.getElementById(id); } }
    function toggle(link, divId) { var lText = link.innerHTML; var d = getObject(divId);
     if (lText == '+') { link.innerHTML = '−'; d.style.display = 'block'; }
     else { link.innerHTML = '+'; d.style.display = 'none'; } }
    </script>
    <!-- flooble Expandable Content header end   -->
          </head>
    
    <body>
    <!-- flooble Expandable Content box start -->
    <div style="border: 1px solid #000000; padding: 0px; background: #EEEEEE; "><table border="0" cellspacing="0" cellpadding="2" width="100%" style="background: #000000; color: #FFFFFF; "><tr><td>ahmed</td><td align="right">
    [<a title="show/hide" id="exp1042839393_link" href="javascript: void(0);" onclick="toggle(this, 'exp1042839393');"  style="text-decoration: none; color: #FFFFFF; ">−</a>]</td></tr></table>
    <div id="exp1042839393" style="padding: 3px;">here we are</div>
    </div><noscript>
    <a href="http://www.flooble.com/scripts/expand.php">this expanable content box is made using a 
    free javascript from flooble</a> | Read free <a href="http://www.flooble.com/perplexus/">math problems</a> on flooble</noscript>
    <!-- flooble Expandable Content box end  -->
    </body>
    </html>
    u can c it working here
    http://www15.brinkster.com/ahmedadly/ex.htm
    my proplem is that the default value of the div is shown and i wanna make the default is hidden
    so can u tell me ??

  2. #2
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try putting this in your html... after your <div></div> area!

    PHP Code:
    <script language="javascript">toggle(getObject('exp1042839393_link'), 'exp1042839393');</script> 
    it should work i think

  3. #3
    SitePoint Addict AHMED's Avatar
    Join Date
    Oct 2002
    Location
    Egypt
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it didnot work

  4. #4
    SitePoint Addict AHMED's Avatar
    Join Date
    Oct 2002
    Location
    Egypt
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sorry working

    soooooooooooooooooooooooooooo
    sorryyyyyyyyyyyyyyyyyyyyyyyyyyyy
    it's working




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
  •