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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Probably a newb question..

    Okay, so I'm very new to HTML but I am making an attempt to learn. I'm attempting to design a page right now and I had something in mind. Problem is, I'm not sure how to do it. That's why I came to you!

    What I want to do is pretty simple. It would appear to be just plain text on a page except when you roll over the text, it changes. On the site, I want the text to simply say 'Enter.' But when they roll over it, it should change to 'Site Under Construction.' Pretty nifty, eh?

    Thank you to anyone that can help me! I appreciate it, believe me.

    -crunchymilk

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,274
    Thanks
    28
    Thanked 271 Times in 265 Posts
    Code:
    <a onmouseover="this.firstChild.data = 'site under construction';">enter</a>
    The script portion of the above code should probably be placed within a script element or an external file.

    Iím not sure why you would want to do this though. I would think that it be more intuitive to simply say up front that the site is under construction.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #3
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Arbitrator View Post
    Code:
    <a onmouseover="this.firstChild.data = 'site under construction';">enter</a>
    The script portion of the above code should probably be placed within a script element or an external file.

    Iím not sure why you would want to do this though. I would think that it be more intuitive to simply say up front that the site is under construction.
    Thank you! I have only one question. Is there anyway to have it change back into "Enter" when they take there mouse off the text?

    As for your question, I'm not creating a real website or anything, I'm just experimenting. That looked fun so I figured I'd try it out.

  • #4
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,274
    Thanks
    28
    Thanked 271 Times in 265 Posts
    Quote Originally Posted by crunchymilk View Post
    Is there anyway to have it change back into "Enter" when they take there mouse off the text?
    Code:
    <a onmouseover="this.firstChild.data = 'site under construction';" onmouseout="this.firstChild.data = 'enter';">enter</a>
    If you donít understand it:
    • this refers to the current element. In this case, that would be the anchor (a) element.
    • firstChild refers to the first child node of the current element. In this case, that would be a text node.
    • data is the content of the text node; its initial content is the word ďenterĒ.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #5
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks!


  •  

    Posting Permissions

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