0

I am new to jquery and javascript.

I wrote some simple functionality using jquery mousemove function in my html page . I wanted to make mousemove work on complete document(web page) .

But there is a specific portion of web page where inside an iframe oracle forms are loaded(As it is running java inside iframe so, it looks like to be using applet to load oracle forms).

Problem : Jquery mousemove function not working inside iframe(but working on other parts of the web page) . If I move my mouse inside the iframe, then jquery code execution is not taking place .

Below is the complete code :

<BODY>

<iframe frameborder="0" style="height: 485px; overflow:scroll; width: 100%" src="http://209.34.231.132/forms/frmservlet?form=ClmRepymt_Dev4&config=dev4" marginheight="1" marginwidth="1" name="cboxmain" id="cboxmain" seamless="seamless" scrolling="no" frameborder="0" allowtransparency="true"></iframe>
<script src="jquery-1.10.2.min.js"></script>

<script>
var timer=0;

function run(){         
    timer++;    

    if(timer == 5){
        $(document).mousemove(function(){         
            $(this).unbind('mousemove');        
            $.ajax({
                url:     'http://localhost/test.html',
                cache:   false,
                data:    'html',
                success: function(data,status) {                       
                }
            });
            timer=0;                                    
        });

    }
}// run ends here

setInterval(run,1000); 
</script>
</BODY>  

Is there any way to make my same code work even if my mouse is moving inside this iframe part ?

I googled a lot but cannot find specific solution for this problem .

Kshitij Jain
  • 1,793
  • 5
  • 19
  • 30
  • possible duplicate of [Detect mousemove when over an iframe?](http://stackoverflow.com/questions/5645485/detect-mousemove-when-over-an-iframe) – Ohgodwhy Jul 14 '13 at 03:31

1 Answers1

0

Thats not possible. The iframe is a complete document in itself and handled the same way. You can't catch inside events from outside code unless you have access to the iframe code which is not, in your case.

Secondly, I am unable to think of any valid reason to detect a mouse-over over an oracle iframe. May be you can re-think the approach/solution. Or you can share your idea here and someone here might help in achieving it.

coding_idiot
  • 13,526
  • 10
  • 65
  • 116