Posted by Ben C on 10/06/06 08:54
On 2006-10-06, Yogi_Bear_79 <nospam@spamsux.com> wrote:
>
> "Harlan Messinger" <hmessinger.removethis@comcast.net> wrote in message
> news:4olbu8Ff1nu8U1@individual.net...
>> Ben C wrote:
>>> On 2006-10-05, Yogi_Bear_79 <nospam@spamsux.com> wrote:
>>>> I created a floating window with the code below. I call it with <div
>>>> id="Uleft"></div>. It contains a table with text and one image. I would
>>>> like to make the entire container clickable. When I click on it I want
>>>> the parent page to change to another page on my website. How?
>>>
>>> Put the whole lot inside an <a> element.
>>
>> A DIV element can't go inside an A element. Only inline elements
>> (excluding another A) can go inside an A.
>
> So is it not possible to do what I want?
You can use JavaScript:
<script>
function click()
{
location = "http://www.google.co.uk";
}
function main()
{
var e = document.getElementById("Uleft");
e.addEventListener("click", click, false);
}
onload = main;
</script>
In your document somewhere should do the trick.
[Back to original message]
|