Click here to Skip to main content
11,924,800 members (50,989 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# VB ASP.NET Javascript HTML , +
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.

<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 6-Feb-13 21:28pm
Edited 6-Feb-13 21:33pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


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:
$('#iframeID')contents().find('body').bind('mousedown', function(){
	// execute some JS on mousedown within iframe

penigandlakoti 7-Feb-13 3:56am
it does not work.iframe tags does not supports the onmouedown and onclick to over come this problem.
Edo Tzumer 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151125.3 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100