Closed Thread Icon

Topic awaiting preservation: Combine onmouseover (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=8288" title="Pages that link to Topic awaiting preservation: Combine onmouseover (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Combine onmouseover <span class="small">(Page 1 of 1)</span>\

 
Kriek
Maniac (V) Inmate

From: Florida
Insane since: Jul 2001

posted posted 08-28-2002 18:16

Is there anyway to combine these two into one tag?

code:
onmouseover="return overlib('Description');" onmouseout="return nd();"

onmouseover="window.status='Description'; return true"



elitecodex
Obsessive-Compulsive (I) Inmate

From: Unknown, MD, USA
Insane since: Aug 2002

posted posted 08-28-2002 18:24

If you are trying to do what I think you are trying to do, then yes.

code:
onmouseover="return overlib(...); window.status='Description'; return true;" onmouseout="return nd();"



just seperate each statement with a semicolon (

Will

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 08-28-2002 18:58

Well, you can't return two things in the same function; after something is returned, the function ends. Try

onmouseover="window.status='Description'; return overlib(...);" onmouseout="return nd();"

Though that may change the logic of what's happening. If overlib() returns false, then the window.status won't change.

elitecodex
Obsessive-Compulsive (I) Inmate

From: Unknown, MD, USA
Insane since: Aug 2002

posted posted 08-28-2002 19:11

Good point.. I didnt look into it that far

Perhaps you could say something like onmouseover="custom_function();" and just put all you need to do in the customer_function()... the overlib, window status and such...

Will

Edit note: I meant onmouseover="return custom_function();"



[This message has been edited by elitecodex (edited 08-28-2002).]

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 08-29-2002 22:21

yeah, that was my take on it...


Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 09-01-2002 04:48
code:
onmouseover="window.status='Description';  return overlib('Description')  && return nd();"




-- not necessarily stoned... just beautiful.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 09-01-2002 12:48

hyperbole: the syntax of your code is correct but it doesn't do what Kriek asked.
the return nd(); is in a onmouseout not in the onmouseover.

Slime: Your code is correct and fits what Kriek asked. Just one point, I was sure only at 99% but just checked ( in IE6.0 and MZ1.1b ), and the value returned by the function has NO effect on that's before ( i.e. the window.status='Description' )
In fact the return value tells the browser if yes or not it should stop to process the event on the current element.

[edit]
exemple:
<a href="my url" onmouseover="window.status='something else';return true">my A tag</a>

like that, onmouseover you see 'something else', but if you return false you'll see 'my url'
[/edit]

Hope the things are more clear for every one.
Best regards,

Mathieu "POÏ" HENRI

[This message has been edited by poi (edited 09-01-2002).]

[This message has been edited by poi (edited 09-01-2002).]

« BackwardsOnwards »

Show Forum Drop Down Menu