making <div> a hyperlink

D

Dave

I've been given a flash banner and told to make it a hyperlink.

I tried this: <script type="text/javascript">
Document.getElementById("flashcontent").onclick = function(){
window.location='http://www.website.com'; }
</script>

but received an error stating that "Document" was undefined.

I also tried this:


<div class="linkdiv"
onclick="javascript:location='http://www.website.com'"
id="flashcontent"> which makes the white space in the <div> a hyperlink
that works but not the flash banner.
 
D

Dave

Thanks, Ed. I changed 'D' to 'd' in document but the result is the
same. White space is hyperlinked. Flash banner is not. Added 'window'
before 'document' without any effect.
 
V

VK

Dave said:
I've been given a flash banner and told to make it a hyperlink.

I can be wrong (I'd like to be) but you may have to return the job back
- unless you can edit the Flash itself.

Flash movie is an event consumer by its own. It means that as soon as
mouse goes over it, it "disappears" for the document - all events are
trapped by Flash. So you can twist around to catch say mouseover, but
no way to know onclick.

AFAIK
 
D

Dave

I was afraid that might be the case. I told them to send me a .gif but
was also wondering if I can put a clear button over it (something else
I don't know how to do)?
 

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

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top