-5

I wrote this code :

<html>
<head>
<title>Long Press</title>
</head>
<body>
<div id="refresh_page">
<button>long press to refresh</button>
</div>
</body>
</html>

I want to do that long press on button by mouse to refresh the page.but without using javascript.

Can any one help me ?

Amir Essam
  • 5
  • 1
  • 3

2 Answers2

4

If you REALLY don't want to use javascript - you can get long click in Flash!

actionscript 3:

private function mouseup(e:MouseEvent):void {
    stage.removeEventListener(MouseEvent.MOUSE_UP, mouseup);
    myTimer.reset();
}
private function showInfo(event:TimerEvent):void{
    //long press code
}
private function mousedown(event:MouseEvent):void{
    myTimer.start();
}

Impossible question = answered

Starscream1984
  • 3,072
  • 1
  • 19
  • 27
1

You can achive this counting time that there's between mousedown and mouseup events.

This seems a duplicated question: How to apply long click event and doubleclick event on the same element in javascript

JS FIDDLE HERE

Community
  • 1
  • 1
Paolo Falomo
  • 427
  • 3
  • 15