| re: Script works in Mozilla but not IE6 (latest versions)?
On 5 Dec 2004 18:43:44 -0800, mark <kidsoft@dsl.pipex.com> wrote:
[snip]
[color=blue]
> <SCRIPT LANGUAGE="JAVASCRIPT">[/color]
The language attribute has been deprecated for over six years. Use the
(required) type attribute instead:
<script type="text/javascript">
[color=blue]
> <!--[/color]
Hiding scripts like that is also an out-dated practice.
[color=blue]
> function roll(img_name, img_src)
> {
> document[img_name].src = img_src;[/color]
There is no reason for a named image to be a property of the document
object. Images have their own collection, images, so it's best to use that:
document.images[img_name].src = img_src;
[snip]
[color=blue]
> onmouseover="roll('sub_but1',
> 'http://www.kidsoft.org.uk/buttons/home1a.gif')"
> onmouseout="roll('sub_but1',
> 'http://www.kidsoft.org.uk/buttons/home1.gif')"[/color]
That's a very cumbersome way to perform rollovers.
[color=blue]
> Any ideas or subtle pointers[/color]
Have a look at <URL:http://www.mlwinter.pwp.blueyonder.co.uk/image-swap/>.
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail. |