Results 1 to 5 of 5

Thread: Random Content Order script Showing Symbol On Page?

  1. #1
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Random Content Order script Showing Symbol On Page?

    1) Script Title: Random Content Order script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ntentorder.htm

    3) Describe problem: The code works but at the top of my web page is a big gap and this:

    -->

    I removed and put up the entire code a few times but it is still there? I looked elsewhere for this but it is definetly due to the code for when I remove the script the issue is gone.

    The only time I can get it to go away is when I take out the first few lines of the script:


    <style type="text/css">
    .group1{
    visibility: hidden;
    }
    </style>


    BUT then the code doesn't word and the images don't show up in random order!

    You can view the issue I am having here, simply look at the top of the page. The nav bar usually touches the top and now there is a gap with that -->

    Any ideas?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,165
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    Only seems to be a problem in some browsers - Firefox here. Others (IE and Opera) are either error correcting and/or skipping the script. It looks as though the script and its css were plopped into an existing commented style block. I didn't test Safari or Chrome. We could go back and fix that. But it's easier and makes more sense (style blocks should no longer be commented, those days are long gone) to make it a single uncommented style block by removing the highlighted in each of these three spots:

    Code:
    <style type="text/css">#navbar-iframe { display:block }
    </style>
    
    <style id='page-skin-1' type='text/css'><!--
    /*
    -----------------------------------------------
    Blogger Template Style
    Name:     Minima
    Date:     26 Feb 2004
    Updated by: Blogger Team
    ----------------------------------------------- */
    /* Variable definitions
    ====================
    <Variable name="bgcolor" descript . . .
    and:

    Code:
     . . . al normal 78% 'Trebuchet MS', Trebuchet, Arial, Verdana, Sans-serif;
    text-transform: uppercase;
    letter-spacing: .1em;
    }
    /* Footer
    ----------------------------------------------- */
    #footer {
    width:660px;
    clear:both;
    margin:0 auto;
    padding-top:15px;
    line-height: 1.6em;
    text-transform:uppercase;
    letter-spacing:.1em;
    text-align: center;
    }
    <style type="text/css">
    .group1{
    display: none;
    }
    </style>
    <script type="text/javascript">
    /***********************************************
    * Random Content Order script-  Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Driv . . .
    and:

    Code:
     . . . eof alltags[i].className=="string" && alltags[i].className.search(classnameRE)!=-1){
    contentobj.ref[contentobj.ref.length]=alltags[i]
    contentobj.text[contentobj.text.length]=alltags[i].innerHTML
    }
    }
    return contentobj
    }
    </script>
    
    --></style>
    <script type="text/javascript">
    if (window.jstiming) window.jstiming.load.tick('headEnd');
    </script></head>
    <body>
    <div class='navbar section' id='navbar'><div class='widget Navbar' id='Navbar1'><script type="text/javascript">
        function setAttrib . . .
    - John
    ________________________

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

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Murray644 (07-31-2011)

  4. #3
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hey John,

    I did remove the second highlighted code:
    <style type="text/css">
    .group1{
    display: none;

    But the 1st and 3rd codes you listed, I see that when I view my page source but from my html page it is no where to be found.

    So for example, compare the first box of code you listed above (from view page source that is what I see also) but when I go to edit my html, this is what I see:

    <b:include data='blog' name='all-head-content'/>
    <title><data:blog.pageTitle/></title>
    <b:skin><![CDATA[/*
    -----------------------------------------------
    Blogger Template Style
    Name: Minima
    Date: 26 Feb 2004
    Updated by: Blogger Team


    So, I/m not really sure what to take out?

    I have tried in Firefox and Chrome and see the --> at the top of my page in both!

    ???

    Thanks!

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,165
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    OK, then we change what we can change. Forget about the first part, you probably don't have access to it.

    Where we removed:

    Code:
    <style type="text/css">
    Still remove that and make that area look like so (this time the highlighted is added code):

    Code:
    .group1{
    display: none;
    }
    -->
    </style>
    <script type="text/javascript">
    /***********************************************
    * Random Content Order script-  Dy . . .
    And here, at the end of the script put (addition highlighted):

    Code:
     . . . ltags[i].className=="string" && alltags[i].className.search(classnameRE)!=-1){
    contentobj.ref[contentobj.ref.length]=alltags[i]
    contentobj.text[contentobj.text.length]=alltags[i].innerHTML
    }
    }
    return contentobj
    }
    </script>
    <style type="text/css">
    <!-- 
    - John
    ________________________

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

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Murray644 (07-31-2011)

  7. #5
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    YOU ROCK! Thank you SO SO much!

    That worked and everything works perfectly now!

    Thank you so much, you have no idea how much I appreciate it!

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
  •