0

Want to implement simple dialog with jquery-mobile on phonegap: http://dev.jtsage.com/jQM-SimpleDialog/demos/string.html

but my LogCat tells me (when I press the button):

05-10 15:02:37.960: V/webview(10536): singleCursorHandlerTouchEvent -getEditableSupport FASLE

<!DOCTYPE HTML>
<html>
<head>
    <meta name="viewport" content="width=600; user-scalable=no" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Prototyp_V.2.0</title>
    <link rel="stylesheet" href="js/master.css" type="text/css" media="screen"   title="no title" charset="utf-8">
    <link rel="stylesheet" href="js/jquery.mobile-1.0a3.min.css" type="text/css" charset="utf-8">  
    <script type="text/javascript" charset="utf-8" src="js/main.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/jquery.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/jquery.mobile-1.0.min.js"></script>
    <style type="text/css">
     .ui-page {
      background: #ffffff;
      }
    </style>  
</head>
<body onload="init();" id="stage" class="theme">        
<script type="text/javascript">     
  function test() {         
    alert("test");      
    $(document).delegate('#simplestring', 'click', function() {
      $(this).simpledialog({
        'mode' : 'string',
        'prompt' : 'What do you say?',
        'buttons' : {
        'OK': {
           click: function () {
             $('#dialogoutput').text($('#dialoglink').attr('data-string'));
           }
        },
        'Cancel': {
           click: function () { },
             icon: "delete",
             theme: "c"
           }
        }
      })
    })
  }
</script>   

<div data-role="page" id="id0">
    <div data-role="header" data-theme="c">
        <h1>Heading</h1>
    </div>
    <div data-role="content">  
       <div id="twitter_"><center>Dialog Box</center>   
          <p>You have entered: <span id="dialogoutput"></span></p>
          <a href="#" id="dialoglink" onClick=test(); data-role="button">Open  Dialog</a>   
       </div>               
    </div>
</body>
</html>

the alert "test" is called, but I always get this cursor event !

Serge P
  • 1,173
  • 3
  • 25
  • 39
mboeckle
  • 938
  • 13
  • 29

1 Answers1

0

What do you mean "cursor event" ? and

use button lik this:

<a href="#" id="dialoglink"  data-role="button">Open  Dialog</a>

And

your function should like this

$(document).delegate('#dialoglink, 'click', function() {

/// Your other code goes here

});

use outside the test function

stay_hungry
  • 1,448
  • 1
  • 14
  • 21
  • I used javascript prompt() instead ;) - dialoglink was not working for me, - Using the new phonegap 1.7 and Jquery-mobile 1.0, also read that's important having a proper combination of these two things – mboeckle May 23 '12 at 14:50
  • @mboeckle I want to open an pdf in cordova using a pop-up, how i approach it, here's a thread i started:[my qstn](http://stackoverflow.com/q/26398508/3421340) – allwynmasc Oct 16 '14 at 11:03