make div clickable link

-Dman100-
-Dman100- used Ask the Experts™
on
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.


<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>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
you could use javascript. Something like this should do the job:

<div id="flashbanner" style="position:absolute;top:117px;z-index:3000;cursor:crosshair;" runat="server" visible="false" onClick="window.location.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>
            
        </div>

Open in new window

-Dman100-Software Consultant

Author

Commented:
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>

Open in new window

Commented:
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.
Commented:
Forgot to attach code
<div style="position:absolute;top:117px;z-index:3000;cursor:crosshair;" runat="server" visible="false" onClick="window.location.href='http://www.google.com'">
	<a style="display:block;height:100%;width:100%;" href="http://www.google.com"> 
		<p>asdasd</p>
	</a>          
</div>

Open in new window

-Dman100-Software Consultant

Author

Commented:
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.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial