View Full Version : probably easy support, but im stuck lol

Valatech Jon
01-21-2009, 12:12 PM
right ok...

Im trying to link from one html page, into another and then into a tab on that page

The code below will open the tab on the page, when the code is already in the said page...

<a href="javascript:tabview2_switch('tabview2',%204);">blank</a>

but what i need is to put it into another page, so that it jumps to say : index.html and then into the tab code

Any ideas boys... it really will be appreciated as im stuck and need this doing asap .. lol

01-21-2009, 12:31 PM
You could make your link in that page like

<a href="index.html#tabview2">Home-tab2</a> and then add a function in the onload of of you index.html like

var str=document.location.hash;

Valatech Jon
01-21-2009, 01:02 PM
hi, almost working..

got it jumping down to the bottom tab view on the index page..

but it doesnt seem to reading the javascript properly..

iv basically got it in the head

<script language="javascript">

var str=document.location.hash;

then the rest of the javascript code is below including the code for the tabs, is this a problem??

ahhh this is bugging me now, but thanks so much for your support... any ideas?

01-21-2009, 01:14 PM
Don't know how your original code works, but I think you need to out quotes around your second argument

Could you post your relevant html+javascript (enclosed in
][/COLOR] here) or a link to your page?

Valatech Jon
01-21-2009, 01:20 PM
one thing.... im a thick *******... and 2nd thing it still aint working lol

1stly... i didnt realise the code i cut had added the %20 mark in for a space, so no wonder it didnt work lol.. it should just be

<a href="javascript:tabview2_switch('tabview2', 4);">blank</a>

but it still wont work

have a look at the following link, it has you code in it, then the code to the page i want to go to...


i want to change the tabs at the bottom when it loads.. dont worry the 2nd page is not the one im using , it is just the one im playing with to get this working

01-21-2009, 01:28 PM
Just try with

<script type="text/javascript">

var str=document.location.hash;
} in that onload block.
btw, make sure that your new onload block won't cancel your previous blocks, if any.


<a href="javascript:tabview2_switch('tabview2', 1);" class="">Payment</a> should be

<a href="#" onclick="tabview2_switch('tabview2', 1); return false;">Payment</a>
And when you adopt the progressive enhancement approach (http://en.wikipedia.org/wiki/Progressive_Enhancement), those links should be again changed to something like

<a href="#tab1" onclick="tabview2_switch('tabview2', this.href);return false;">Payment</a> Then you'd need to make the necessary adjustments in your html and javascript to make your tabs accessible for user who have no javascript support.

Valatech Jon
01-21-2009, 01:38 PM
still nothing... ahhhh

can you see the code for the 2nd html page??? is it blocking any other blocks??

thanks loads for your attempted help

Valatech Jon
01-21-2009, 01:42 PM
trying your edit now

2 seconds

Valatech Jon
01-21-2009, 01:52 PM
right, i have renamed the files, as i was getting confused lol




still cant get the bugger to work though, its best to get it to load into the 2/3rd tab for the time being, so i know it works, once it does that, i can add and change for the rest later...

can you see what im doing wrong?? thanks again !

Valatech Jon
01-21-2009, 04:48 PM
any one else?? need this quite quick you see !!!