Andy wrote:
[color=blue]
> On Thu, 9 Oct 2003 20:04:58 -0500, "Richard" <anom@anom> wrote:[/color]
[color=blue][color=green]
>>I'm beginning to undertake php for the fun of it.[/color][/color]
[color=blue][color=green]
>>Working on a problem I hope can be solved in php.
>>Basically what I have is this:[/color][/color]
[color=blue][color=green]
>><body>[/color][/color]
[color=blue][color=green]
>><img name="main" src="image1.jpg">
>><a href="#"
>> onMouseOver="document.main.src='image2.jpg'"
>> onMouseOut="document.main.src='image1.jpg'">one</a>[/color][/color]
[color=blue][color=green]
>></body>[/color][/color]
[color=blue][color=green]
>>Ok I know, shoot me. I know "name" is not a valid attribute[/color][/color]
[color=blue]
> No firearms required; it's perfectly valid. <img> does have a name
> attribute.[/color]
[color=blue]
>
http://www.w3.org/TR/html4/struct/objects.html#h-13.2[/color]
[color=blue][color=green]
>>How would I go about converting this same effect to PHP?[/color][/color]
[color=blue]
> Once the HTML (or whatever you've output with PHP) has been sent to
> the
> browser, PHP has no more involvement with what the user does, until
> there's
> another request. So PHP cannot directly react to the user moving the
> mouse over
> a part of the user interface of whatever browser they're using. The
> user would
> have to click a link or submit a form for a pure PHP solution.[/color]
Thanks. I found a way out of it and it even validates.
onmouseover="document.images[0].src='image2.jpg' "
onmouseout="document.images[0].src="image1.jpg' "