Log in

View Full Version : Trustpilot content in tab doesn't load unless page is refreshed



BilstonBob
10-14-2013, 03:54 PM
1) Script Title: Tab Content Script (v 2.2)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

3) Describe problem: The tabs, scripts and styling are working fine. However, I'm trying to display a Trustpilot customer reviews widget in the 'Reviews' tab on this page http://www.castleberg.greenjerseywebdesign.co.uk/acatalog/Womens-Salomon-Balmaz-GTX-Active-Jacket-13.html. The reviews don't display unless I refresh the page (I've just discovered the same problem on another customer site). I can use 'onClick="location.reload()"' for this particular tab, which does display the content after a page reload, but it reloads the entire page and I'd prefer just to reload the content in the tab if possible. Can anyone help?

Thanks

Anthony

Deadweight
10-14-2013, 04:11 PM
First if you are using the script from Dynamic Drive you need to include this:


/***********************************************
* Tab Content script v2.2- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

Second, which web browser are you viewing this from?

jscheuer1
10-14-2013, 05:14 PM
.

Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.

That said, the widget probably cannot initialize properly when it's display none, which is what the unseen tabs are in this script. When I have more time I will see if I can modify the script to use a combination of absolute positioning and visibility to hide the unseen tabs instead of the display property. That's usually what must be done to fix this sort of thing.

I Got the time:

First backup the .js and .css files you're using now, just in case. Use the updated .js and .css files in the attached archive (right click and 'Save As'):

5256