|
Posted by Yogi_Bear_79 on 10/06/06 15:14
"Ben C" <spamspam@spam.eggs> wrote in message
news:slrneic6b7.elb.spamspam@bowser.marioworld...
> 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.
Thanks! I guess I still need a little more help though. I tried the code in
the BODY tag, the DIV tag, and even as a SSI, but nothing happens. any
ideas?
Navigation:
[Reply to this message]
|