Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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.
 
<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
v4

1 solution

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

Solution 1

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:
$('#iframeID')contents().find('body').bind('mousedown', function(){
	// execute some JS on mousedown within iframe
});
 
Cheers,
Edo
  Permalink  
v5
Comments
penigandlakoti at 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.
Edo Tzumer at 7-Feb-13 4:00am
   
Updated the solution with an idea you can try out.
penigandlakoti at 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
0 OriginalGriff 299
1 Maciej Los 295
2 Sergey Alexandrovich Kryukov 230
3 Aajmot Sk 191
4 Sinisa Hajnal 166
0 OriginalGriff 7,760
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,785


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2014
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