Web Analytics Made Easy -
StatCounter Hiding / Placing Text In Status Bar - CodingForum

Announcement

Collapse
No announcement yet.

Hiding / Placing Text In Status Bar

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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 .

    [email protected]

  • #2
    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>

    jasonkarldavis.com

    Comment


    • #3
      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

      Comment


      • #4
        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; Oct 5, 2002, 12:51 PM.
        redhead

        Comment


        • #5
          But how do you do that within an image map?

          Comment


          • #6
            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>
            
                                    
            [url]http://hotwired.lycos.com/webmonkey/96/40/index3a.html?tw=programming[/url]
            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

            Comment


            • #7
              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?

              Comment


              • #8
                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

                Comment


                • #9
                  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

                  Comment


                  • #10
                    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
                    "nam et ipsa scientia potentas est" - Francis Bacon

                    Comment

                    Working...
                    X