Results 1 to 8 of 8

Thread: Dynamic content error .....I do not find it...any help please

  1. #1
    Join Date
    Nov 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dynamic content error .....I do not find it...any help please

    Hello to you all,

    honestly I do not have any experience with javascript, that is why I hope at you all. I just copied the script I for dynamic context menu and added to my page, BUT it does not work . Funny is that if I test it via phase5 it work ......so I am very suprised...
    The error code I get is: "bobexaple is null (zero) or no object" ???????

    Code:
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title></title>
    <META NAME="DESCRIPTION" CONTENT="">
    <META NAME="KEYWORDS" CONTENT="">
    <meta name="robots" content="index,follow">
      <link rel="stylesheet" href="../include/style.css" />
      <script type="text/javascript" src="../include/script.js"></script>
      <script type="text/javascript">zeiger="ul1";</script>
      <!--[if IE 6]>
      <link rel="stylesheet" href="../include/ie6.css" />
      <![endif]-->
      <!--[if IE]>
      <link rel="stylesheet" href="../include/ie.css" />
      <![endif]-->
      <!--[if lt IE 6]>
      <link rel="stylesheet" href="../include/ie5.css" />
      <![endif]-->
    <script type="text/javascript" src="switchcontent.js" >
    </script>
    <style type="text/css">
    /*Style sheet used for demo. Remove if desired*/
    .handcursor{
    cursor:hand;
    }
    .switchgroup1{
                padding-bottom:50px;
    }
    
    </style>
    
    </head>
    HTML Code:
    <body onload="start()" body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
    <div id="seite">
    <div id="logo"><a href="index.htm"><img src="../img/logo.jpg" alt=""  /></a></div>
    
    <div id="navi_o">
        <ul>
            <li><a href="XXX.htm"><b>XXX</b>&nbsp;|&nbsp;</a></li>
            <li><a href="XX.htm"><b>XX</b> &nbsp;|&nbsp;</a></li>
            <li><span id="active"><b>XX</b>&nbsp;|&nbsp;</span></li>
            <li><a href="XX.php"><b>XX</b></a></li>
        </ul>
    </div>
    
    <div id="menu">
        <ul>
            <li><a href="javascript:void(0);" onclick="lese('ul1')"><b>X</b></a></li>
            <ul id="ul1">
              <li><a href="X.htm">X</a></li>
              <li><span id="active">X</span></li>
            </ul>
            <li><a href="XX.php?nav=2"><b>XX</b></a></li>
        </ul>
    </div>
    
    <div id="content">
    <body text="#000000" bgcolor="#FFFFFF" link="#0000CC" alink="#0000CC" vlink="#0000CC">
    <div><h5><a style="text-decoration:none" href="javascript:bobexample.sweepToggle('contract')">Contract</a> | <a style="text-decoration:none"
    
    href="javascript:bobexample.sweepToggle('expand')">Expand</a></div></h5>
    <h3 id="bobcontent1-title" class="handcursor">blablala </h3>
    <div id="bobcontent1" class="switchgroup1">
    </div>
    
    <h3 id="bobcontent2-title" class="handcursor"> blablala </h3>
    <div id="bobcontent2" class="switchgroup1">
    </div>
    
    <h3 id="bobcontent3-title" class="handcursor"> blablala </h3>
    <div id="bobcontent3" class="switchgroup1">
    </div>
    
    <script type="text/javascript">
    //   MAIN FUNCTION: new switchcontent("class name", "[optional_element_type_to_scan_for]") REQUIRED
    //1) Instance.setStatus(openHTML, closedHTML)- Sets optional HTML to prefix the headers to indicate open/closed states
    //2) Instance.setColor(openheaderColor, closedheaderColor)- Sets optional color of header when it's open/closed
    //3) Instance.setPersist(true/false)- Enables or disabled session only persistence (recall contents' expand/contract states)
    //4) Instance.collapsePrevious(true/false)- Sets whether previous content should be contracted when current one is expanded
    //5) Instance.defaultExpanded(indices)- Sets contents that should be expanded by default (ie: 0, 1). Persistence feature overrides this setting!
    //6) Instance.init() REQUIRED
    var bobexample=new switchcontent("switchgroup1", "div") //Limit scanning of switch contents to just "div" elements
    bobexample.setColor('darkred', 'black')
    bobexample.setPersist(true)
    bobexample.collapsePrevious(true) //Only one content open at any given time
    bobexample.init()
    </script>
    
    <script type="text/javascript">
    var joeexample=new switchcontent("switchgroup2", "p") //Limit scanning of switch contents to just "p" elements
    joeexample.setStatus('[open] ', '[closed] ')
    joeexample.setColor('green', 'red')
    joeexample.collapsePrevious(false) //Allow more than 1 content to be open simultanously
    joeexample.setPersist(false)
    joeexample.defaultExpanded(0,1)
    joeexample.init()
    </script>
    
    <div id="footer">
        <div id="foot_txt">
            <a href="xxx.htm">xxx</a>&nbsp;|&nbsp;<a href="xxx.php">xxxt</a>&nbsp;|&nbsp;<a href="A.htm">A</a>
        </div>
        <div id="xxx"><a href="http://www.xxx.de">xxx.de</a></div>
    </div>
    </div>
    </body>
    
    </html>
    
    
    
    

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.
    - John
    ________________________

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

  3. #3
    Join Date
    Nov 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hilfeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee (Help!)

    es geht um diesen script
    (it is the script)

    http://www.dynamicdrive.com/dynamici...tchcontent.htm
    Last edited by jscheuer1; 11-30-2007 at 09:40 PM. Reason: translate

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    Now, I copied your code and used a copy of the script from Dynamic Drive. The page looked a mess, but the expand and contract links worked.

    You cannot have two body tags on a page, and body isn't an attribute, but that wasn't causing a problem with the script. I have no access to the code for '../include/script.js' or your stylesheets, those may be conflicting. To see about that:

    Please post a link to the page on your site that contains the problematic code so we can check it out.


    I'd highly recommend validating your HTML and css code:

    http://validator.w3.org/

    and:

    http://jigsaw.w3.org/css-validator/
    Last edited by jscheuer1; 12-02-2007 at 04:08 PM. Reason: grammer
    - John
    ________________________

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

  5. #5
    Join Date
    Nov 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hello,
    the page has been made by a webprogrammierer and not me, I do not have really experience within css/html and more

    there are so many problems? mistakes ?

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Please post a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

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

  7. #7
    Join Date
    Nov 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    the page isnīt online yet, fortunally

    I can just sent you the files..

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It would be easier for me if you just uploaded a demo of it (including all of the supporting scripts, style, and images) somewhere and gave me the link to it.
    - John
    ________________________

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

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
  •