Click here to Skip to main content
12,357,130 members (69,923 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# VB ASP.NET Javascript HTML , +
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 20:28pm
Edited 6-Feb-13 20: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 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 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
Web02 | 2.8.160621.1 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2016
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