1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Switching Tabs

Discussion in 'JavaScript' started by Hades, Nov 18, 2007.

  1. #1
    Hi. I am completely new to Ajax, and only know what it is. I have a little problem. I need to make a site, which will have 3 tabs. I need to be able to switch those tabs using ajax, but I have no clue how to do it. Can anyone help me? I attached an image showing what it would look like.

    In each tab, there will be text links.

    If anyone can help me, i would really appreciate it.
     

    Attached Files:

    Hades, Nov 18, 2007 IP
  2. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #2
    You can do it with AJAX, but I don't recommend because that way is not SEO friendly (Search Engines will not see your links)
    But AJAX is not the only way, you can do it too using dynamic HTML only.
    A way is with CSS + DOM functions to hide/display your three panels (or positioned DIVs).
    Search engines can see your links because the content for three panels are there, you're only hidding 2 of 3 panels everytime.
     
    ajsa52, Nov 18, 2007 IP
    Hades likes this.
  3. Hades

    Hades Well-Known Member

    Messages:
    1,873
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    150
    #3
    Oh, really? I didn't know that. I definately need it to be SEO friendly. But what's dom? I have never heard of it before?
     
    Hades, Nov 18, 2007 IP
  4. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #4
    You can use the script explained on this page: Tab Content Script (v 2.0)

    Check with "Demos" if it's what are you looking for.

    BTW: DOM stands for Document Object Model, and is a way to refer to XML or HTML elements as objects. Look here for more info about DOM
     
    ajsa52, Nov 19, 2007 IP
  5. Hades

    Hades Well-Known Member

    Messages:
    1,873
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    150
    #5
    THat seems to be exactly what I need, but it doesn't seem to work in a Wordpress post. Any ideas?
     
    Hades, Nov 19, 2007 IP
  6. Hades

    Hades Well-Known Member

    Messages:
    1,873
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    150
    #6
    I need somethign like this that i can put inside of the post of wordpress. I only need it on the front page, and not anywhere else, so unless there is a way to make it appear only on the home page, I will need something else. Any idea?
     
    Hades, Nov 20, 2007 IP
  7. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #7
    ajsa52, Nov 20, 2007 IP