[ 2 posts ]

Lisa Haitz

  • Username: lisa3711
  • Joined: Fri Jul 27, 2012 11:17 am
  • Posts: 1
  • Offline
  • Profile
Tags:

tab view content loaded from another javascript?

Post Posted: Fri Jul 27, 2012 11:27 am
+0-
We have a vendor that requires us to put a search form on our web page that they host. I would like to put this into my TabView.

Vendor code:
Calls the script (not an issue)
Code:
<script type="text/javascript" id="s8e7a6270b4be012f499b00237dd8628a" src="http://vendor.com/widgets/box.js"></script>


This part should go into TabView:
Code:
<script type="text/javascript">new CustomSearchBox({"id":"#s8e7a6270b4be012f499b00237dd8628a","params":{"s.ho":["f"],"keep_r":true},"colors":{"tagline":"#000000"},"tagline_text":"Search to find articles, books, and more","searchbutton_text":"Search","advanced_text":"Advanced Search","advanced":"true","suggest":"true","tagline":"true","popup":"true"})</script>


I currently call the tabs like this and want to put the above where indicated below.

Code:
(function() {
    var tabView = new YAHOO.widget.TabView();

      tabView.addTab( new YAHOO.widget.Tab({
        label: 'Articles & Moretest',
        content: '<div class="c62l"><div class="highlightbox">{code should go here}</div>',
        active: true
    }))


Can I do this?

John Lindal

YUI Contributor

  • Username: jafl
  • Joined: Mon Nov 02, 2009 2:33 pm
  • Posts: 352
  • Location: Los Angeles, CA
  • Twitter: jafl5272
  • GitHub: jafl
  • Gists: jafl
  • Offline
  • Profile
Tags:

Re: tab view content loaded from another javascript?

Post Posted: Mon Jul 30, 2012 8:36 am
+0-
The script will not be executed because all scripts are ignored when setting innerHTML. For YUI 3, you can use http://yuilibrary.com/gallery/show/dispatcher. For YUI 2, you will probably have to build something yourself. It boils down to eval()
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum