Results 1 to 5 of 5

Thread: Window Status Text With A Link.. *slvd*

  1. #1

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065

    Window Status Text With A Link.. *slvd*

    hey ya,

    I have an image hyperlink,

    i want the windows status text to be "Delete Directory [$dir]" when the person hovers their Mouse on the image,
    how can i do this?

    onMouseover="javascript:window.status='Delete Directory [$dir]';"

    doesnt work

    it only shows the Hyperlink

    ne ideas?
    Last edited by wpearsall; Jan 6th, 2003 at 10:51 PM.
    Wayne

  2. #2
    New Member
    Join Date
    Jul 2002
    Posts
    14
    Try something like:

    onMouseover="window.status='Delete Directory [$dir]';return true"

    I'm not quite sure what you mean by [$dir], however.
    -JavaScript Kit- JavaScript tutorial and scripts!
    -CodingForums.com- Web coding and development forums

  3. #3
    Lively Member
    Join Date
    Dec 2002
    Location
    southwest pennsylvania
    Posts
    65
    i think you misunderstand the use of "javascript:".
    it is used in links, as href.
    example:
    <A href="javascript:foo()">do foo!</A>
    is the same as
    <A onClick="foo()">do foo!</A>
    the difference is the link appearance
    if you choose not to decide you still have made a choice!

    RUSH rocks!

  4. #4
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Yes I have to agree on the javascript: thing, you only need that for hrefs (which isn't the best way to do it anyway, but that's another thing). And what you may find is that you want to use the onmousemove event, as most browser fire the onmouseover event (and setting the status) then the default behavour of the browser kicks in afterwards and change the status to the path of the link.

  5. #5

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065
    hey ya,

    It is workin now ne how (I needed to add it like:

    <a href="index.php?cwd=.&amp;action=get&amp;file=IF+%26+VLOOKUP.xls" onMouseOver="status='Download File [IF & VLOOKUP.xls]'; return true;" onMouseout="javascript:window.status='';"><img src="/icons/generic.gif" width=20 height=22 border=0 alt="">IF & VLOOKUP.xls</a>

    [so it's fixed now ]
    Wayne

Posting Permissions

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



Click Here to Expand Forum to Full Width