Click here to Skip to main content
12,951,548 members (51,520 online)
Rate this:
Please Sign up or sign in to vote.
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 20:28pm
Updated 6-Feb-13 20: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
OriginalGriff 6,084
CHill60 3,480
Maciej Los 3,083
Jochen Arndt 1,975
ppolymorphe 1,830

Advertise | Privacy | Mobile
Web01 | 2.8.170525.1 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2017
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