Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,
i am koti, i asign the onclick() function to <iframe> tag ,it does not working.i want to know how many clicks on that <iframe> tag.

HTML
<iframe scrolling="no" frameborder="0" src="http://localhost/koti/Advertisements.aspx?id=8" style="width: 120px; height: 240px;float:right" title="soccer games"  önmousedown="incrseclick(24)" >soccer games&gt;</iframe>


it does not works for me.any body knows how to solve the this. please share the information for me.


Thanks in Advance.
Posted
Updated 6-Feb-13 20:33pm
v4

1 solution

Hi,

Try onmousedown insread of your önmousedown.

BTW, I'd have a look at this thread[^] comparing onmousedown and onclick.


** You may need to bind the function to the event:
JavaScript
$('#iframeID')contents().find('body').bind('mousedown', function(){
	// execute some JS on mousedown within iframe
});


Cheers,
Edo
 
Share this answer
 
v5
Comments
penigandlakoti 7-Feb-13 3:56am    
it does not work.iframe tags does not supports the onmouedown and onclick function.how to over come this problem.
Joezer BH 7-Feb-13 4:00am    
Updated the solution with an idea you can try out.
penigandlakoti 9-Feb-13 0:07am    
if u donot mine,u will give the example for that.i donot know jquery.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900