Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6873035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:00:23+00:00 2026-05-27T04:00:23+00:00

I have in my application layout file an external javascript file witch has several

  • 0

I have in my application layout file an external javascript file witch has several lines of code and at the end runs a function like BooManager.init() no big deal…

the problem is, it is not running the inside code on this javascript file.

this is how i use it:

<script type="text/javascript">
    bb_bid = "1615455";
    bb_lang = "en-US";
    bb_keywords = "iphone4s, apple";
    bb_name = "custom";
    bb_limit = "8";
    bb_format = "bbb";
</script>
<%= javascript_include_tag "http://widgets.boo-box.com/javascripts/embed.js" %>

but it didn`t do anything it was suposed to do…

i`ve tried in simple html file and it works… what am i doing wrong?

NOTE:

the default way in html is this:

<script type="text/javascript">
    bb_bid = "1615455";
    bb_lang = "en-US";
    bb_keywords = "keywords, between, commas";
    bb_name = "custom";
    bb_limit = "8";
    bb_format = "bbb";
</script>
<script type="text/javascript" src="http://static.boo-box.com/javascripts/embed.js"></script>

— EDIT —

the result generated by rails:

<script type="text/javascript" src="http://static.boo-box.com/javascripts/embed.js"></script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:00:24+00:00Added an answer on May 27, 2026 at 4:00 am

    It’s not evaluating the script when loading using the <%= method. I’m not familiar with that syntax, but from the effect, that’s what it sounds like. It’s treating the script as html rather than code.

    jQuery has a script load function that will get a script dynamically from a URL and then eval() it to execute it.

    UPDATED WITH SAMPLE CODE

    Add jQuery to your app:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
    

    Then use it to load your script:

    $.getScript('http://widgets.boo-box.com/javascripts/embed.js');
    

    UPDATE NUMBER 2

    I was able to duplicate the problem in this fiddle: http://jsfiddle.net/7x2zT/4/

    If what you are trying to accomplish is to get your parameters activated before the script shows the widget – the default one looks like a sidebar, whereas your parameters make it more of a banner, then just make sure you put your parameters above the <script src stuff.

    If you must be able to load dynamically, then you’re going to have to figure out where the bug lies in the embed code, or if there’s some other activation method. That site’s documentation doesn’t seem to be in English, so I can’t help with that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that has a primary layout of portrait (it is fixed
I have this layout file in my android application: <?xml version=1.0 encoding=utf-8?> <TabHost xmlns:android=http://schemas.android.com/apk/res/android
I have an application layout in my rails app to give a default header/footer
I have two libraries and a single application assembly project layout and I'm wondering
I'm currently working out the layout of a WPF Application and seem to have
I am using Tiles within my web-application. I have a standard-layout (standard.jsp) within the
I have an xml layout file which contains a few widgets including a Spinner
Assuming I have a .properties file and hibernate.cfg.xml in a standard maven web application
I have following question. I'd like to place a file named data.xml into sdcard/appname
I have an MXML file, which references an external script file for all its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.