Skip navigation
lheinem99
Currently Being Moderated

testing interactive web page for ipad

Jan 19, 2012 8:42 AM

Tags: #desktop #javascript #ipad #html5 #device #central #emulator #simulator #touchevents

I have a very minimal html page that I'm trying to test in Device Central. The code is:

<!DOCTYPE HTML>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Untitled Document</title>

 

 

</head>

 

 

<body>

test

<div id = "dragMe">drag this</div>

<div id = "content"></div>

</body><script>

  var _test = document.getElementById("dragMe");

  _test.addEventListener("touchstart", testStart, false);

  _test.addEventListener("touchmove", testMove, false);

  _test.addEventListener("touchend", testEnd, false);

  var _feedback = document.getElementById("content");

 

  function testStart(e)

  {

  _feedback.innerHTML = "start";

  }

  function testMove(e)

  {

  _feedback.innerHTML = "Move";

  }

  function testEnd(e)

  {

  _feedback.innerHTML = "end";

  }

  </script>

</html>

 

 

 

 

 

 

As you can see, all the page is doing is listening for touch events. Here's the following issues:

  1. When I use an ipad emulator on Device Central, nothing fires.
  2. Device Central's output panel displays "JSERR: A JavaScript Exception was not handled. Some functionality on the HTML page may be broken."
  3. I uploaded the html page to my website and tested it on my iPhone. The event listeners registered (worked)

 

Does Device Central not work for this? (for the record, no, ipadPeek DOESN'T register these event listeners either). Does anyone know of a way to test this kind of interactivity from your desktop?

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points