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
    Jun 2002
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hiding / Placing Text In Status Bar

    This is probably something easy to do but it's eluded me so far ! How do I enter text into the status bar to hide where the pages are being loaded from (my site is hosted in one place and then ghosted onto the main address) any help much appreciated .

    simon@thesickroom.co.uk

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    window.status = 'my message';

    If called from an event such as onmouseover in an <a> element, you'll need a return true:

    <a href="#" onmouseover="window.status = 'hello world'; return true" onmouseout="window.status=''">a link</a>


  • #3
    Regular Coder
    Join Date
    May 2002
    Location
    Helsinki, Finland
    Posts
    231
    Thanks
    0
    Thanked 1 Time in 1 Post
    Originally posted by jkd
    window.status = 'my message';

    If called from an event such as onmouseover in an <a> element, you'll need a return true:

    <a href="#" onmouseover="window.status = 'hello world'; return true" onmouseout="window.status=''">a link</a>

    In addition: I always wondered why you have to add also return true;. This prevents URL of the link (which is usually shown) to misplace your window.status string value.

    There's also defaultStatus property, which is shown by default. However, I see no reason to use it, because it doesn't help user at all when his/her status bar has text "Welcome to my site" on it.

    And, though window is a top-level object, it's adviced to use window reference at least before :
    window.status
    window.event
    Zvona
    First Aid for
    Web Design

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts

    This is how i do it...

    on my site i used to do nearly every link with that on... and to be honest its quite long for what it does to put on every link... so i do it something like this...

    PHP Code:
    <script language="JavaScript" type="text/javascript">
    function 
    bar(message) {
      
    self.status=message; return true}
    function 
    out() {
      
    bar('')}
    </script>

    <a href="page.html" onmouseover="return bar('whatever')" onmouseout="out()">Link</a> 
    Hope this helps...
    Last edited by redhead; 10-05-2002 at 06:51 PM.
    redhead

  • #5
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But how do you do that within an image map?

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Posts
    676
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Originally posted by StarWrist
    But how do you do that within an image map?
    star...
    just a like® this...:O)))
    Code:
                                 <a href="my_map.map"><img src="my_image.gif" border=0
                                 usemap="#foo" ismap></a>
    
                                 <map name="foo">
                                 <area href="yellow.html" coords="20,20,70,60"
                                 onMouseOver="window.status='yellow'; return true">
                                 <area href="red.html" coords="90,20,140,60"
                                 onMouseOver="window.status='red'; return true">
                                 <area href="blue.html" coords="20,80,70,120"
                                 onMouseOver="window.status='blue'; return true">
                                 <area href="green.html" coords="90,80,140,120"
                                 onMouseOver="window.status='green'; return true">
                                 </map>
    
                            
    http://hotwired.lycos.com/webmonkey/...tw=programming
    The New JustaBuster Version 2.0 OR JustaBusta Lite V2.0
    ...just a special® thanx kinda hugs to jkd n' nex ...:O)))

    CommemorateWTC.com --Please lend your support

  • #7
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That works. But only partially. It leaves if on there but it doesn't put it on there when I roll the pointer over the clickable part of the map. (If that makes any sense to you, it does in my head, but it's crazy in there...)

    I want it to display text down in the status bar when I put the cursor over the link. Not just down there all the time.

    Think you can help?

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Posts
    344
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok.. same goes for an imagemap...

    <a href="#" onMouseOver="window.status='your status text'; return true;" onMouseOut="window.status=''; return true;">click here</a>

    That's pretty much it.

    ~Quack

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Posts
    344
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sorry, I'll post for the image map part..

    <area href="#" onMouseOver="window.status='Your Status Text'; return true;" onMouseOut="window.status=''; return true;" shape="rect" coords="0,0,100,100">

    hope that clears it up

    ~Quack

  • #10
    New Coder
    Join Date
    Jun 2002
    Location
    Caerdydd
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This isn't working for me, I still get the URL of the link showing. Is there anything else that might cause the problem?

    BL


  •  

    Posting Permissions

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