View Full Version : hiding the links on Ajaxtabscontent

11-06-2009, 09:21 AM
could someone help me to hide tab links on dynamicdrive's ajaxtabscontent script?

'cause, some users trying to open pages with "open in new window"...


i want to show a small keyword on href of tabs; not the whole link. and to decode the keyword links, i think i should add a 'if condition' into ajaxtabs.js .. but how??

for example:
into html: <a href="#1">tab1</a> (not <a href="whoweare.php">tab1</a>)

into js: if (pageurl = #1) {pageurl = whoweare.php}

11-06-2009, 12:38 PM
Hi orhun,

I have made some changes in ajaxtabs.js (http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/ajaxtabs/ajaxtabs.js) file to accomodate the points you've mentioned.

Just replace the default (I would say to rename the default ajaxtabs.js to ajaxtabs_0.js) with the attached file.

I haven't got much time for checking the outcome though I am pretty sure that the code should work without any issues.

Most importantly you don't have to make any changes in the markup that needs this script by default like the way you've suggested. Everything will be handled by the JS. In other words in your application just replace the current ajaxtabs.js with the one attached in this post. Thats all you need to do.

Let me know if there is any issues.

Hope this helps.

11-08-2009, 12:08 PM
Thank you so much Codeexploiter...

but... could u also explain how to use this script?

- what will i show in href? <a href="#1">tab1</a> or something else?

- and, where will i show that #1 = whoweare.php ?
( if (pageurl = #1) {pageurl = whoweare.php} etc.)

11-10-2009, 09:41 PM
could someone help me?

11-19-2009, 06:41 PM

12-01-2009, 11:34 AM
Give your tab links like the following code itself. The links should be replaced with your own links. The rest will be handled by JS (it will store those links internally and remove them from anchor elements as you've mentioned).

<ul id="countrytabs" class="shadetabs">
<li><a href="#" class="selected" rel="#default">Tab 1</a></li>
<li><a href="external2.htm" rel="countrycontainer">Tab 2</a></li>
<li><a href="external3.htm" rel="countrycontainer">Tab 3</a></li>
<li><a href="external4.htm" rel="#iframe">Tab 4</a></li>
<li><a href="http://www.dynamicdrive.com">Dynamic Drive</a></li>