Results 1 to 3 of 3

Thread: Code don't match with blogger

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

    Question Code don't match with blogger

    Hi everybody,

    i'm new here and need help to some simple thing...

    a text box to my blogs (amazon style txt box)

    Here is the code...

    Code:
    <style type="text/css">
    
    #dropinboxv2cover{
    width: 320px; /*change width to desired */
    height: 220px;  /*change height to desired. REMOVE if you wish box to be content's natural height */
    position:absolute; /*Don't change below 4 rules*/
    z-index: 100;
    overflow:hidden;
    visibility: hidden;
    }
    
    #dropinboxv2{
    width: 300px; /*change width to above width-20. */
    height: 200px; /*change height to above height-20. REMOVE if you wish box to be content's natural height*/
    border: 2px solid black; /*Customize box appearance*/
    background-color: lightyellow;
    padding: 4px;
    position:absolute; /*Don't change below 3 rules */
    left: 0;
    top: 0;
    }
    
    </style>
    
    <script type="text/javascript">
    
    /***********************************************
    * Amazon style Drop-in content box- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit DynamicDrive.com for hundreds of DHTML scripts
    * This notice must stay intact for legal use
    * Go to http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    var dropboxleft=200 //set left position of box (in px)
    var dropboxtop=100 //set top position of box (in px)
    var dropspeed=15 //set speed of drop animation (larger=faster)
    
    //Specify display mode. 3 possible values are:
    //1) "always"- This makes the fade-in box load each time the page is displayed
    //2) "oncepersession"- This uses cookies to display the fade-in box only once per browser session
    //3) integer (ie: 5)- Finally, you can specify an integer to display the box randomly via a frequency of 1/integer...
    // For example, 2 would display the box about (1/2) 50% of the time the page loads.
    
    var displaymode="always"
    
    ///Don't edit beyond here///////////
    
    if (parseInt(displaymode)!=NaN)
    var random_num=Math.floor(Math.random()*displaymode)
    var ie=document.all
    var dom=document.getElementById
    
    function initboxv2(){
    if (!dom&&!ie)
    return
    crossboxcover=(dom)?document.getElementById("dropinboxv2cover") : document.all.dropinboxv2cover
    crossbox=(dom)?document.getElementById("dropinboxv2"): document.all.dropinboxv2
    scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
    crossbox.height=crossbox.offsetHeight
    crossboxcover.style.height=parseInt(crossbox.height)+"px"
    crossbox.style.top=crossbox.height*(-1)+"px"
    crossboxcover.style.left=dropboxleft+"px"
    crossboxcover.style.top=dropboxtop+"px"
    crossboxcover.style.visibility=(dom||ie)? "visible" : "show"
    dropstart=setInterval("dropinv2()",50)
    }
    
    function dropinv2(){
    scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
    if (parseInt(crossbox.style.top)<0){
    crossboxcover.style.top=scroll_top+dropboxtop+"px"
    crossbox.style.top=parseInt(crossbox.style.top)+dropspeed+"px"
    }
    else{
    clearInterval(dropstart)
    crossbox.style.top=0
    }
    }
    
    function dismissboxv2(){
    if (window.dropstart) clearInterval(dropstart)
    crossboxcover.style.visibility="hidden"
    }
    
    function truebody(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
    }
    
    function get_cookie(Name) {
    var search = Name + "="
    var returnvalue = ""
    if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) {
    offset += search.length
    end = document.cookie.indexOf(";", offset)
    if (end == -1)
    end = document.cookie.length;
    returnvalue=unescape(document.cookie.substring(offset, end))
    }
    }
    return returnvalue;
    }
    
    if (displaymode=="oncepersession" && get_cookie("droppedinv2")=="" || displaymode=="always" || parseInt(displaymode)!=NaN && random_num==0){
    if (window.addEventListener)
    window.addEventListener("load", initboxv2, false)
    else if (window.attachEvent)
    window.attachEvent("onload", initboxv2)
    else if (document.getElementById || document.all)
    window.onload=initboxv2
    if (displaymode=="oncepersession")
    document.cookie="droppedinv2=yes"
    }
    
    </script>
    that I put at the "head", follow rhe instructions...

    and that:
    Code:
    <div id="dropinboxv2cover">
    <div id="dropinboxv2">
    
    INSERT YOUR CONTENT HERE. DO NOT REMOVE THE TWO OUTER DIVS<br>
    <p align="right"><a href="#" onClick="dismissboxv2();return false">Close It</a></p>
    
    </div>
    </div>
    I put on the body

    Then Google Blogger says:

    Erro ao analisar XML, linha 704, coluna 10: The entity name must immediately follow the '&' in the entity reference.

    (error at line 704...)

    That is the line:

    if (!dom&&!ie)


    link to code: http://www.dynamicdrive.com/dynamici...amazondrop.htm


    Since i'm not a programmer, I really stop here...I have no idea how to put the box working...


    I have 28 blogs where I want to use that resource, all blogger...any help to solve that?


    Thanks a lot
    Last edited by Beverleyh; 10-05-2013 at 09:13 PM. Reason: Formatting

  2. #2
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    512
    Thanks
    9
    Thanked 61 Times in 59 Posts

    Default

    First, you need to wrap your code in BB codes.
    Second, what's your question?
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  3. #3
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    I have to say that the active members here are more familiar with building their own applications than using 3rd party hosted services such as Blogger (where you cant edit the source code directly).

    The most helpful advice I can give you it to first Google the error message and look for solutions there - I did a quick search and this came up at the top: http://stackoverflow.com/questions/1...tity-reference

    The second piece of advice is to ask for advice in the Blogger community, or from the developers - they are much more familiar with their own platform and will be able to advise of limitations - what can and can't be done with their software.

    Good luck
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

Similar Threads

  1. ISO blogger CSS code for side wrapper borders
    By sleepingbeautie in forum CSS
    Replies: 3
    Last Post: 03-31-2013, 10:48 AM
  2. Replies: 3
    Last Post: 09-16-2012, 05:03 AM
  3. Replies: 0
    Last Post: 07-05-2008, 10:07 AM
  4. css table match up
    By tiggeret86 in forum CSS
    Replies: 1
    Last Post: 05-29-2008, 06:07 AM
  5. .fadecolor match to containing div
    By robincham in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 04-06-2007, 10:36 PM

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
  •