www.webdeveloper.com
Results 1 to 7 of 7

Thread: can't figure out why div collapsed and JS won't display, please help!

Hybrid View

  1. #1
    Join Date
    May 2013
    Posts
    12

    can't figure out why div collapsed and JS won't display, please help!

    Yesterday this page looked fine and today it's not (http://iphonebuy-host1.gaiahost.net/index.html) Clearly I must've inadvertently deleted or changed something but I can't figure out what!

    There is a form embedded in #reviews-code using JavaScript, but it is suddenly not displaying. Also #reviews is not expanding to fit its contents any longer. I should say that I know nothing about JS and just copied the embed code from re-vu.com. Having repeatedly and thoroughly checked my CSS and HTML, I'm inclined to believe there is something up with the JS. CSS is below:

    Code:
    #reviews {
    background:#F2F2F2;
    width:57em;
    height:100%;
    margin:-1.5em 0 2em 0;
    padding:1em 1.5em 1em 1.5em;
    border-radius:1.5em;
    -moz-box-shadow: 0 2px 2px 2px #ccc;
    -webkit-box-shadow: 0 2px 2px 2px #ccc;
    box-shadow: 0 2px 2px 2px #ccc;
    }
    
    /** Reviews text box **/
    #reviews-text {
    background:#fff;
    width:14.8em;
    padding:.5em .8em;
    border-radius:1em;
    float:left;
    -moz-box-shadow: 0 2px 2px 1px #ccc;
    -webkit-box-shadow: 0 2px 2px 1px #ccc;
    box-shadow: 0 2px 2px 1px #ccc;
    }
    
    /** container for embedded ReVu window **/
    #reviews-code {
    margin:0 0 .5em 17.8em;
    padding:.5em;
    width:38em;
    background:#fff;
    border-radius:1em;
    -moz-box-shadow: 0 2px 2px 1px #ccc;
    -webkit-box-shadow: 0 2px 2px 1px #ccc;
    box-shadow: 0 2px 2px 1px #ccc;
    }

    And HTML/JavaScript:

    HTML Code:
    <div id="reviews">
    <h2>Reviews</h2>
    <div id="reviews-text">
    <p>To prove our trustworthiness, check out our customer reviews. Comments
    here can not be deleted - you are getting the unedited truth from our past customers!
    We have no fear of anything our customers have to say, as we will do whatever it
    takes to make you happy. Be assured that you will get only honesty and fairness
    from us. So, please leave your honest comments.</p>
    <p>Questions? Email us at: <br />support@appleiphonebuyers.com.</p>
    </div>
    <div id="reviews-code">
    <script type="text/javascript">
    var revsysJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + revsysJsHost + "re-vu.com/reviewsystem/embed_code.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    try{
    var revsys_shortname = 'appleiphonebuyers';
    var revsys_identifier = 'unique_dynamic_id_1234';
    var revu_width= '600';
    show_review();
    } catch(err) {}
    </script>
    </div>
    </div>

  2. #2
    Join Date
    Mar 2007
    Location
    U.K.
    Posts
    1,127
    Quote Originally Posted by spacebetty View Post
    Having repeatedly and thoroughly checked my CSS and HTML
    "NetworkError: 404 Not Found - http://iphonebuy-host1.gaiahost.net/print.css"
    Check that it's on the server.

  3. #3
    Join Date
    May 2013
    Posts
    12
    It wasn't on the server... I disregarded that error because it hadn't caused any issues before today and I didn't think that could be it. Just in case, after seeing your comment, I made a file called print.css and uploaded it to the server, but it didn't help.

  4. #4
    Join Date
    Mar 2007
    Location
    U.K.
    Posts
    1,127
    Code:
    <script type="text/javascript" src="http://www.re-vu.com/reviewsystem/embed_code.js">function show_review(){ 
    
    //var revsys_shortname; 
    
     
    if (typeof(short_url) != 'undefined') {
    A <script> tag with a src attribute cannot also enclose script statements.

  5. #5
    Join Date
    May 2013
    Posts
    12
    Hmm. The src attribute is in a separate <script> tag from the rest of the code, isn't it?

    Quote Originally Posted by Logic Ali View Post
    if (typeof(short_url) != 'undefined') {
    I don't see that bit of script in my code, where did it come from?

  6. #6
    Join Date
    Mar 2007
    Location
    U.K.
    Posts
    1,127
    Quote Originally Posted by spacebetty View Post
    I don't see that bit of script in my code, where did it come from?
    It is generated by another script. The tags are probably OK it's just the way the debugger shows the code.
    However the debugger also shows that your form elements aren't being appended, so for some reason the script isn't executing.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles