Help - Search - Members - Calendar
Full Version: Marquee Behaviour Of Html Code
BleepingComputer.com > Internet & Networking > Web Site Development
   
ahmedlibrian
Hello friends!
Friends i have made an html website. I apply a marquee text that move up from down. The problem is that i want to stop the moving text "applied marquee" on "mouse over" and moves it again on "mose down". How can i do this. If it is not applied on marquee then how can i do this you can write a code for me.

I am waiting for your reply and praying for this forum to proceed ahead ......... Well done guys and good effort ........

Ahmed Hassan !
chiefmasterjedi
here you go, this will make the marquee stop on mouse over and begin again on mouse out
CODE
        <marquee id="test" behavior="scroll" direction="up" height="200" scrolldelay="100" scrollamount="2" onMouseOver="document.all.test.stop()" onMouseOut="document.all.test.start()">
            
This is my test
            
        </marquee>


Here is what the above code will look like test marquee


Note: If you change the marquee id="test" statement, then you will have to change the mouse over and mouse out statements to match (IE: onmouseover="document.all.test.stop()"

For mouse down include this line within <marquee>
CODE
onMouseDown="document.all.test.start()"
OR
onMouseOut="document.all.test.stop()"


I hope this helps,
Chief.

P.S. this is really basic and the text will stop if your mouse enters the marquee area. You will need to refine your code to give the impression that it is the text that your stopping............like make the marquee width smaller, or better still turn the text that is scrolling into a link and add the mouse over and mouse out statements within the link attributes.
Here is an example
CODE
<marquee id="test" behavior="scroll" direction="up" height="200" scrolldelay="100" scrollamount="2">

<a href="index.html" onMouseOver="document.all.test.stop()" onMouseOut="document.all.test.start()">This is my test</a>

</marquee>

This will stop only the text and looks like this Test #2 marquee
ahmedlibrian
Hell mater!
This is the code that i was looking for. I am really grateful to you for your such a help. Thankyou very much once again. Listen soon from your side ........ Bye
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.