38 users online (0 members and 38 guests)  


  Results 1 to 5 of 5

Related

  1. Replies: 0
  2. aligning page contents    Forum: CSS Forum
    Replies: 4
  3. Changing Text with a button    Forum: Javascript Forum
    Replies: 1
  4. Replies: 1
  5. Changing link colors in middle of page    Forum: HTML Forum
    Replies: 1
  1. #1
    miketheman's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2007
    Posts
    2

    Changing specific text contents at the same page with click on link...

    Hello!

    Iīm a totally newbie at HTML (done some other programming though). Iīm in the mood of trying to arise an site about my band.

    On the page Iīm having 5 links that I would like to direct to the very same page but with only some of the text contents changed.

    Iīve tried to search for similar webpages to look at the sourcecode, but havenīt found any. Iīve tried to find general exemples on internet, but havenīt got as close as I expected to get.

    Thought I would find it here, but nothing close as far as I can see. My main problem, I guess, is that Iīm not even sure of what kind of code Iīm looking for...

    Thanks in advance for any direction of where I may find what Iīm looking for!

    Cheers!
    /Mike

  2. #2
    coreybryant's Avatar
    Texan at Heart

    Status
    Offline
    Join Date
    Jun 2003
    Location
    Castle Rock, CO
    Posts
    107

    Re: Changing specific text contents at the same page with click on link...

    Is HTML code for automatic jump to top of page what you are looking for? It is not used that often but on some FAQ pages you will see it used a lot

  3. #3
    miketheman's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2007
    Posts
    2

    Re: Changing specific text contents at the same page with click on link...

    Hello!

    Thanks for your fast reply. Well itīs not really the same thing as what I want.

    To begin with I started with a free template that I downloaded. The layout of this template is kinda 3-column based. Leftmost is an smaller area where basically just links are placed. In the middle column one will find texts, which I plan to have as the main "window" where one read about news and all that stuff. The rightmost column has some smaller separate areas where one will find "old news" that probably wonīt change for a long time.

    Itīs the middle column "the main window". That is the one where I want to swap texts without interfere anything on the left and/or right column.

    Based on my not too great programming experience in other languages and ways of thinking thereof. My guess is that itīs possible to do so without refreshing (keeping all other things unchanged) the whole thing everytime I click a link. īCause if I did it that way, it would lead to having as many versions of the whole layout including all text and images as the amount of links. With just the differencies being the only thing thats different between them!

    If I really want to keep most things the same, then I better aim for coding for changing the differencies!

    Thanks anyway for listening, any ideas?
    / Mike

  4. #4
    chiefaberach's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2007
    Posts
    2

    Re: Changing specific text contents at the same page with click on link...

    Hi Mike,

    I had the same problem and found your message while I was looking for the solution. I eventually found out how to make buttons look like normal text here:

    http://cssm.wordpress.com/2006/10/01/how-do-i-make-a-submit-button-look-like-text/


    The basic idea is to make a class of button which is transparent and the html code for this is:

    .btn { background-color: transparent; border: 0; padding: 0;}

    which goes in your stylesheet. If you want it to look like the rest of your text you should also add the other details here (e.g. color: white; ).


    Then you make sure the button in your form has this code:

    <input type=”button” class=”btn”>



    The only problem I haven't worked out yet is how to make the text change colour like a link or how to change the cursor into the hand while over the text.

    Good luck!

    chiefaberach

  5. #5
    chiefaberach's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2007
    Posts
    2

    Thumbs up Re: Changing specific text contents at the same page with click on link...

    Hello again,

    I've just figured out the cursor / hand thing.

    I found the answer here:

    http://www.webmasterworld.com/forum91/2175.htm

    You just need to add these 2 items in the css code:

    cursor: pointer;
    cursor: hand;

    You have to use both so that different browsers understand it. They also have to be in this order.

    I don't think I'll bother making the text change colour like a link for the site I'm working on now, but if anyone knows the code for that it would be useful in the future.



Tags for this Thread