Code Red
08-15-2008, 11:34 AM
1) Script Title: Ajax Tabs Content Script (v 2.2)
2) Script URL (on DD): www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm
3) Describe problem:
First of all, love this script - best Javascript tabs script I've seen yet. I've modified it for use on one of my OS Commerce (PHP) sites but I have three problems/questions -
1. Any links in the tab content open within the tab window itself, but I want them to open in the parent window. As the site content is dynamic and there are thousands of products, I don't have a lot of control over any links that may appear in the tab window, so adding target = "_top" to the end of all the URLs isn't an option. Is there any way to set a default link target within the script itself?
2. I've set the tab window to a fixed height, rather than jumping up and down in size depending on what tab is clicked, so I'm loading the content into Iframes. Is there any way to get the content of the default DIV container to load into an Iframe? At the moment if the text is too long it drops out of the bottom of the box and runs down the page. One solution was to create an external page with the default content and load that up, but this created its own separate problems and I'd rather not do it this way. In fact, being able to load DIV contents rather than external pages into Iframes would get around problem #1 nicely...
3. The persistent tab option is great, the only drawback is it applies this across the whole site - so if you view product 'A' and click a particular tab, when you view product 'B' it shows the same tab as the default. Any easy way of making it specific to a particular page? I could probably come up with something using sessions etc, but I'm lazy and hoping there's some quick and easy solution!
I'm not that hot on Javascript, so sorry if these questions are elementary!
2) Script URL (on DD): www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm
3) Describe problem:
First of all, love this script - best Javascript tabs script I've seen yet. I've modified it for use on one of my OS Commerce (PHP) sites but I have three problems/questions -
1. Any links in the tab content open within the tab window itself, but I want them to open in the parent window. As the site content is dynamic and there are thousands of products, I don't have a lot of control over any links that may appear in the tab window, so adding target = "_top" to the end of all the URLs isn't an option. Is there any way to set a default link target within the script itself?
2. I've set the tab window to a fixed height, rather than jumping up and down in size depending on what tab is clicked, so I'm loading the content into Iframes. Is there any way to get the content of the default DIV container to load into an Iframe? At the moment if the text is too long it drops out of the bottom of the box and runs down the page. One solution was to create an external page with the default content and load that up, but this created its own separate problems and I'd rather not do it this way. In fact, being able to load DIV contents rather than external pages into Iframes would get around problem #1 nicely...
3. The persistent tab option is great, the only drawback is it applies this across the whole site - so if you view product 'A' and click a particular tab, when you view product 'B' it shows the same tab as the default. Any easy way of making it specific to a particular page? I could probably come up with something using sessions etc, but I'm lazy and hoping there's some quick and easy solution!
I'm not that hot on Javascript, so sorry if these questions are elementary!