SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2009
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    bad javascript? hello bar solo only working on homepage - no other pages

    I'm running a bigcommerce store and have the hello bar solo custom code installed in the site footer. I've also tried placement of the hellobar code in various spots (header template files, default template files, page specific template files). For some reason the hello-bar only works on my homepage, but never on any of the other pages.

    Any ideas as to why? Seems like if i place this in the footer it should show up on every pages but that's not what i'm getting. please let me know if you need more details or code samples to help.

    thanks

    btw, bigcommerce support also thinks that the hellobar should show up on every page if i have this code in the footer, but its not working. my guess is that it's the javascript but I dont know my way around that.

    Here's the code I'm using:

    Code:
      <div id="mailchimp_form" style="display:none;">
    <form action="http://xxxxx.us5.list-manage.com/subscribe/post" method="POST">
    <input type="hidden" name="u" value="xxxxxxxx">
    <input type="hidden" name="id" value="xxxxx">
    Get an instant coupon code by signing up to our newsletter.  Email: <input type="email" autocapitalize="off" autocorrect="off" name="MERGE0" id="MERGE0" size="25" value="" />
    <input class="button" type="submit" value="Subscribe" />
    </form>
    </div>
    <!-- Hello Bar configuration start -->
    <script type="text/javascript">
    var mailChimpForm = document.getElementById('mailchimp_form').innerHTML;
    new HelloBar( mailChimpForm, {
        showWait: 1000,
        positioning: 'sticky',
        fonts: 'Arial, Helvetica, sans-serif',
        forgetful: true
    }, 1.0 );
    </script>
    And here are the references that I've placed in the header:
    Code:
    <link type="text/css" rel="stylesheet" href="content/hellobar.css" />
    <script type="text/javascript" src="content/hellobar.js"></script>

  2. #2
    SitePoint Addict
    Join Date
    Apr 2011
    Posts
    266
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi
    Check in the source code of the other pages if there are the html elements for hello bar.
    Also, if the links to hellobar.css and hellobar.js included in those page open these files.
    A <base> tag in head zone can affect the relative url.
    Free: Web Programming Courses HTML, CSS, Flash
    Web Programming: AJAX Course and PHP-MySQL Course video Lessons
    Good JavaScript and jQuery course for beginners


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
  •