the Flash object disables the onClick event of <a></a> tag when it's placed beteen the tags

Hello everybody,

 

I have problem when I put flash object between the <a></a> tag, the problem is that all the events of the <a> tag work fine except onClick, and the flash also works fine. I need the onClick event to open new page when user click on the flash view.

 the code looks like this:

----------------------------------------------------

<a id="" onclick="doSomething" ...>

<object>

<param> 

<param> 

<param> .....

<embed></embed>

<object> 

</a>

 --------------------------------------

anybody has idea, how to fix this problem and making the onClick work. I've tried with z-index and the wmode attributes of the flash but this does not serve.

 

thanks

 

0
nick2008
9/30/2008 9:11:47 AM
πŸ“ asp.net.client-side
πŸ“ƒ 24353 articles.
⭐ 1 followers.

πŸ’¬ 7 Replies
πŸ‘οΈβ€πŸ—¨οΈ 1049 Views

 Hi

Try To use OnClientClick 

 

Please Mark it as Answer if it helped you


Regards
Mrugank Dholakia
0
Mrugank
9/30/2008 9:21:03 AM

thank you very much for your reply

 

onClientClick is not valid attribute of the <a></a> tag.

this is the error message I got when I used it.

 

Actually, I solve  the problem with onmousedown  event and then to test the left mouse button using javascript. but the problem is that I need the (hand) mouse pointer to

appear also when the mouse moves over the flash file.

0
nick2008
9/30/2008 2:25:51 PM

Hi

Please Try this 

<a id="id1" runat="server" href='<%=linkvar%>' target="_blank"> ....   </a>

here the linkvar will be the variable which is public and globle so you can assign the link from code behind as we have made the control as runat server

and target="_Blank"will open link in new page 

 

Please mark As Answer If it helped You


Regards
Mrugank Dholakia
0
Mrugank
10/1/2008 4:56:41 AM

 HI

If the Above dont work

then have a look at the blog

http://adamnoffie.blogspot.com/2007/07/wrapping-flash-swf-with-hyperlink.html

 


Regards
Mrugank Dholakia
0
Mrugank
10/1/2008 5:15:40 AM

Hi

 I've just tried out this:

<a id="" href='<%#Eval("link")%>'  >

</a>

 

but it does not work also. Tongue Tied

The link of the blog you posted is about adding the hyperlink in the flash file itself, which I can do, becuase I have not the permission to change in the flash file.

regards

0
nick2008
10/1/2008 9:31:05 AM
HI nick2008
 
Based on my experience, if all of the above solution cannot work, may be that functionality is built into the flash object (just like YouToBe’s flash player)
 
So, if they all do its hard coded into the flash, there is nothing that we can do about it.
 
Please check the following link to see a thread which talks about the similar issue:
 
http://forums.asp.net/t/1326933.aspx
 
Thanks.

 


Lance Zhang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Lance
10/2/2008 5:58:29 AM

Hi

using the event onClick has not solved the problem also, maybe the only solution is to build this functionality into the flash file itself, which I can not do becuase I am not allowed to do any change on the flash files.

 I hope somebody will come up with good solution

thanks to all

 

0
nick2008
10/2/2008 9:58:48 AM
Reply: