Why cursor-hand in collapsible list disappears with custom pictur.

  • Thread starter perseverant/obstinate
  • Start date
P

perseverant/obstinate

I know how to introduce a cursor hand to a collapsible list. However, when I
use a picture bullet instead of a plain bullet or number, the cursor hand
doesn`t work. Can anybody help?
 
P

perseverant/obstinate

I haven't introduced any codes by hand. I just write the collapsible list,
change the plain bullet for a picture bullet and then change L1. The code
comes out like this:
<body onclick="dynOutline()" language="Javascript1.2">

<ul imagesrc="file:///C:/Documents and Settings/Javier/My Documents/My Web
Sites/Láser Master 1/LOGO botón.gif" dynamicoutline initcollapsed>
<LI STYLE="cursor:hand">Item<ul imagesrc="file:///C:/Documents and
Settings/Javier/My Documents/My Web Sites/Láser Master 1/LOGO botón2.gif">
<li>Item</li>
<li>Item</li>
<li>Item</li>
</ul>
</li>
</ul>

</body>
 
M

Murray

<ul imagesrc="file:///C:/Documents and Settings/Javier/My Documents/My Web
Sites/Láser Master 1/LOGO botón.gif" dynamicoutline initcollapsed>
<LI STYLE="cursor:hand">Item<ul imagesrc="file:///C:/Documents and
Settings/Javier/My Documents/My Web Sites/Láser Master 1/LOGO botón2.gif">
<li>Item</li>
<li>Item</li>
<li>Item</li>
</ul>
</li>
</ul>

There is so much invalid HTML in that short stretch of code, it makes me
chuckle! What is adding the 'imagesrc attribute to the <ul> tag?

Anyhow, if you want the pointer to appear when the word "Item" is moused
over, you will need to do this -

<li><a href="javascript:;">Item</a><ul....
 
P

perseverant/obstinate

Don´t chuckle too hard, Murray, lest you choke. That "useless" bit of code is
obviously fetching the custom picture bullet that I want to replace the plain
bullet with. (Did you actually read the question?) It is when I replace the
plain bullet or number with a custom picture bullet (fetched by that "invalid
HTML" that makes you chuckle) that the cursor hand fails to appear. To get a
cursor hand to appear with plain bullets and numbers you only have to edit
the li tag to read <LI STYLE="cursor:hand">

Anyway, I've tried what you suggest and the cursor hand does show, but at
the expense of my custom picture bullet which is replaced by a plain bullet!
So thanks for your trouble, but don't lose sight of what the original problem
was: the fact that when you use a custom picture bullet the cursor hand
doesn't work!
 
P

perseverant/obstinate

Actually, I've tried it again putting it in in a different order and it works
- I don't lose my custom picture bullet - many thanks!
 
M

Murray

Don´t chuckle too hard, Murray, lest you choke. That "useless" bit of code
is
obviously fetching the custom picture bullet that I want to replace the
plain
bullet with.

Not in any modern browers, it doesn't. And, that effect that is so easily
accomplished with CSS, is costing you a page that validates.
Did you actually read the question?

Of course. Did you read the answer?
the li tag to read <LI STYLE="cursor:hand">

Again, it's invalid markup, and not recognized by modern browsers. So -
open your page in Firefox, or Safari, and you get none of your cherished
effects.
Anyway, I've tried what you suggest and the cursor hand does show, but at
the expense of my custom picture bullet which is replaced by a plain
bullet!

That's simple to manage with CSS. Remove the bullet altogether, and use
your image as a non-tiling background image for the <li> tag.
 
P

perseverant/obstinate

Thanks again for your help and apologies for the unwarranted sarcasm. As you
might have noticed, I am a complete tyro barely familiar with Java script. I
am just using FrontPage 2003 to construct my first website and the programme
itself introudces the code, as you know. I did get the cursor hand to work by
doing the list with plain bullet points first and and then replacing them
with a picture bullet and using the code you suggested instead of <LI
STYLE="cursor:hand"> (this time the ///C:/Documents and Settings string
doesn't show in the code). But elsewhere I have used the <LI
STYLE="cursor:hand"> Are you saying that a lot of browsers will take no heed
of it? This worries me because it can't surely be the only FP bit of script
that a lot of browsers won't recognise. So presumably, then, a lot of the
animation, swap pictures, etc that one does with FP won't work in many
browsers?

Incidentally, the code now reads so:
<hr>
<ul dynamicoutline initcollapsed imagesrc="LOGO botón.gif">
<li><font face="Book Antiqua">
<a href="javascript:;" style="text-decoration: none">
<font color="#000000">Item</font></a></font><ul imagesrc="LOGO
botón2.gif">
<li>
<font size="2" face="Book Antiqua">
Item</font></li>

Thanks again for your help, and humble apologies once again.
 
M

Murray

Are you saying that a lot of browsers will take no heed

Yes, since cursor:hand is not valid CSS, all modern browsers will ignore it.
It's IE proprietary, and that's likely why it appears in FP.
So presumably, then, a lot of the
animation, swap pictures, etc that one does with FP won't work in many
browsers?

Not at all. Most of it is just fine.

You can test your code for whether it's likely to be ignored by modern
browsers by validating it here -

http://validator.w3.org

Be prepared.

By the way "Book Antiqua" is not websafe, meaning that if the visitor
doesn't have it installed, they will see Times/Times New Roman (or whatever
the browser default is).
 
M

Murray

Just so you'll know, I wouldn't do collapsible lists that way, anyhow. As
you can see, the code is NOT cross-browser/platform reliable.

I have a demo page of a good way to do them here -

This method solves the problem with FP's collapsible
list code that is NOT FF/NN compatible, and will therefore work in all
browsers.

http://www.murraytestsite.com/collapsiblelist.htm

It uses some CSS, and the FP Change Property behavior.

You may find it a bit advanced, though....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top