PDA

View Full Version : CUrsor Remains When Using a Form in ANylink



DrthVictor
06-10-2005, 07:07 AM
AnyLink Drop Down Menu
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

Hello,

I am using the AnyLink script to pull down a search form on my forums. It works great and I am brushing up on my CSS to get it to look just like I want it to. So, thank you for the script :)

Since I am using a text field, when the block disappears, it leaves behind a blinking cursor. Can somebody tell me how to clear it?

Thanks in advance for any help!

jscheuer1
06-10-2005, 07:21 AM
Dealing with a lingering cursor type can be tough at times. Generally though, the first line of attack is to determine what function executed last before you were left with the undesirable cursor. Then just tack on some code to that function to change the cursor style to whatever you want (default is usually good). Sometimes the target element must be one that has just departed, other times it needs to be the body or whatever element the cursor is on at that moment. If this condition does not persist say, it reverts to a normal cursor after you move it about a bit, I wouldn't worry over it. If you want more specific advice . . .

.

DrthVictor
06-10-2005, 02:00 PM
If you want more specific advice . . .

.
Thanks for the quick reply. Since it is a part of a forum, here is a link to a thread that uses the script:

http://www.adversitysg.com/viewtopic.php?t=548

Steps to Reproduce:

1. In the upper right, click the link at the top of the first post that reads "Search Within Topic"
2. When the form drops down, click inside the text field.
3. Move your mouse away so the dropdown disappears.
4. Note leftover cursor where the form used to be.

jscheuer1
06-10-2005, 05:08 PM
Boy, what an involved page! And, this is not the actual cursor but, a phantom one. No matter. First off, this only seems to happen in Mozilla (FF NS and perhaps other Gecko based browsers). Second, if you click on any other part of the document, this phantom insertion cursor goes away. Third, the actual cursor is unaffected. All this considered, I would leave it alone but, there is a method that pops to mind. The part in the script that makes the drop down disappear after the mouse has moved over it and then away is contained in this section of the script:
if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')Change it to look like this:
if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event);this.blur()"></div>')That might not get it but, it is the most innocent way of getting it. Next method is change it to this:
if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event);if (ns6){this.parentNode.focus()}"></div>')and finally, if that won't do:
if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event);if (ns6){this.parentNode.parentNode.focus()}"></div>')If none of that gets it we will probably have to resort to reloading the page, which seems unacceptable to me for a page of this nature. I have one other idea involving the display property but, try these first.

DrthVictor
06-10-2005, 06:24 PM
Boy, what an involved page!

I hope that's a compliment ;) My game group likes it, though it is a bit heavy on the code. Flow and navigation are still under heavy development.

Anyway, thanks for the tips. I'll give them a try when I get home. If the only solution is reloading the page, then I will probably live with it as is. We have a member with a 300k sig(!) and I can't very well tell him to change it, since it's his hosting we are using. So, due to this, reloading the page could be painful for slower connections.

DrthVictor
06-11-2005, 03:54 PM
I tried all three methods and none worked. I can live with the ghost cursor. Just figured that if it was possible to remove it, I would. But I can live with it. Thank you for the help :)

jscheuer1
06-12-2005, 06:59 AM
Well if you are still game, we could try substituting display:none for visibility:hidden but, this is a little more complicated. It requires also substituting display for visibility everywhere it is used in the script and substituting none for hidden everywhere and substituting block for visible everywhere. If you want to try it but want more detailed instructions, let me know. If you just do a global search and replace on:

visibility (replace all with) display
hidden (replace all with) none
visible (replace all with) block

That should get it, assuming my idea will work. Keep a back up of the page, just in case this causes other problems. And make sure to replace all occurrences of each word, including in the html for this script, if any.