-Dman100-
asked on
make div clickable link
Is there a way to make a div a clickable link? I have flash object in a div and I want the div to be clickable to navigate to another page. The flash developer wanted to externalize the link so if it needed to be changed, the flash movie would not have to be updated.
The link works in Firefox, but not IE. Is there a way to get the div to be a clickable link in IE?
See code below.
Thanks.
The link works in Firefox, but not IE. Is there a way to get the div to be a clickable link in IE?
See code below.
Thanks.
<div id="flashbanner" style="position:absolute;top:117px;z-index:3000;cursor:crosshair;" runat="server" visible="false">
<a style="display:block;height:100%;width:100%;" href="About/Yes.aspx">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="940" height="294"> <param name="movie" value="SWF/banner4marketing.swf" /> <param name="quality" value="high" /> <param name="wmode" value="transparent" /> <embed src="SWF/banner4marketing.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="940" height="294"></embed> </object>
</a>
</div>
ASKER
I tried that, but it still isn't clickable. When you have your cursor over the flash movie, you can see the correct link the bottom left of the browser window, but it isn't clickable?
<div id="flashbanner" style="position:absolute;top:117px;z-index:3000;cursor:crosshair;" runat="server" visible="false" onClick="window.location.href='About/Yes.aspx'">
<a style="display:block;height:100%;width:100%;" href="About/Yes.aspx">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="940" height="294"> <param name="movie" value="SWF/banner4marketing.swf" /> <param name="quality" value="high" /> <param name="wmode" value="transparent" /> <embed src="SWF/banner4marketing.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="940" height="294"></embed> </object>
</a>
</div>
You don't need that a tag there as the link is specified in the onClick event. That works for me anyway though as you have it (the code below works). The only thing I can guess is that the flash animation is stealing control.
If thats the case you could try putting a div above the embedded flash object and making that clickable. I'm dubious that will work though.
If thats the case you could try putting a div above the embedded flash object and making that clickable. I'm dubious that will work though.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Putting a div on top didn't work either. Not sure what else to try at this point?
Thanks for your help and suggestions. I appreciate it.
Thanks for your help and suggestions. I appreciate it.
Open in new window