Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    probably easy support, but im stuck lol

    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

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    You could make your link in that page like
    Code:
    <a href="index.html#tabview2">Home-tab2</a>
    and then add a function in the onload of of you index.html like

    Code:
    window.onload=function(){
    var str=document.location.hash;
    tabview2_switch(str,%204);
    }
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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">

    window.onload=function(){
    var str=document.location.hash;
    tabview2_switch(str,%204);
    }

    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?

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Don't know how your original code works, but I think you need to out quotes around your second argument
    Code:
    tabview2_switch(str,'%204');
    Could you post your relevant html+javascript (enclosed in [CODE][/CODE] here) or a link to your page?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...

    http://www.valatech.co.uk/ebay/asdfg.htm

    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

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Just try with
    Code:
    <script type="text/javascript">
    
    window.onload=function(){
    var str=document.location.hash;
    if(str)
     tabview2_switch(str,4);
    }
    in that onload block.
    btw, make sure that your new onload block won't cancel your previous blocks, if any.

    PS:
    Code:
    <a href="javascript:tabview2_switch('tabview2', 1);" class="">Payment</a>
    should be
    Code:
    <a href="#" onclick="tabview2_switch('tabview2', 1); return false;">Payment</a>
    And when you adopt the progressive enhancement approach, those links should be again changed to something like
    Code:
    <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.
    Last edited by abduraooft; 01-21-2009 at 12:35 PM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #7
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #8
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    trying your edit now


    2 seconds

  • #9
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    right, i have renamed the files, as i was getting confused lol

    www.valatech.co.uk/ebay/1.html

    and

    www.valatech.co.uk/ebay/2.html

    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 !

  • #10
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    any one else?? need this quite quick you see !!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •