Commit 6f425814 by David Baumgold

Merge pull request #1392 from edx/db/attach-image_input_click-to-window

Attach image_input_click function to window object
parents 0be9daf9 c7dcb0bb
/////////////////////////////////////////////////////////////////////////////
//
// Simple image input
// Simple image input
//
////////////////////////////////////////////////////////////////////////////////
// click on image, return coordinates
// put a dot at location of click, on imag
// window.image_input_click = function(id,event){
function image_input_click(id,event){
window.image_input_click = function(id,event){
iidiv = document.getElementById("imageinput_"+id);
pos_x = event.offsetX?(event.offsetX):event.pageX-iidiv.offsetLeft;
pos_y = event.offsetY?(event.offsetY):event.pageY-iidiv.offsetTop;
......@@ -21,4 +19,4 @@ function image_input_click(id,event){
document.getElementById("cross_"+id).style.top = cy;
document.getElementById("cross_"+id).style.visibility = "visible" ;
document.getElementById("input_"+id).value =result;
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment