This is a migrated thread and some comments may be shown as answers.

Insert JS defined tab image

2 Answers 63 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Nik
Top achievements
Rank 1
Nik asked on 18 Nov 2010, 04:13 PM
Our site uses power reviews and we are going to be testing a new details page with tabbed content. We'd like to have one of the tabs have the star rating image for that product instead of text. The reviews call to make that image is:

<script type="text/javascript">POWERREVIEWS.display.snippet(document, { pr_page_id : "PAGE_ID" });</script>

PAGE_ID is a token that gets replaced by the sku # by the vb.net code behind.

Can I get some suggestions on how to add this to the radTab?

2 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 18 Nov 2010, 07:21 PM
Hello Nik,

Why don't you try something liek this:

var tabStrip = $find("<%=RadTabStrip1.ClientID%>");
var tab = tabStrip.get_tabs()[0];
tab.set_text("[Power Rating]");

Pretty much what it does is get the RadTabStrip, then gets the first tab and the sets the text. Just change the index and replace "[Power Rating]" with the rating that gets returned from your js function.

I hope that helps.
0
Nik
Top achievements
Rank 1
answered on 18 Nov 2010, 07:40 PM
The problem is that the JS call doesnt return just a rating, but a whole set of custom code in a div...which I realize now I can't just plug it in because it pulls back more than the image. BUT, I'm still wondering if the case were the JS call returns an image url...how would I insert that onto the tab?
Tags
TabStrip
Asked by
Nik
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Nik
Top achievements
Rank 1
Share this question
or