javascript - Doesn't work the onclick event in my Phonegap app -


my name borja , started programming phonegap , first issue related non-existent executing of .js files. index.html code :

<html> <head>    <meta charset="utf-8" />   <meta name="viewport" content="width=device-width, user-scalable=no">   <link href="css/jquery.mobile-1.4.3.min.css" rel="stylesheet" type="text/css" />   <link rel="stylesheet" href="css/font-awesome.min.css" />   <link rel="stylesheet" href="css/jquerymobile.nativedroid.css" />   <link rel="stylesheet" href="css/jquerymobile.nativedroid.light.css"  id='jqmndtheme' />   <link rel="stylesheet" href="css/jquerymobile.nativedroid.color.green.css" id='jqmndcolor' />   <link rel="stylesheet" href="css/custom.css" />   <script src="js/jquery-1.9.1.min.js"></script>   <script type="text/javascript" charset="utf-8" src="js/index.js"></script>      </head> <body>  <div data-role="page" data-theme='b'>       <div data-role="header" data-position="fixed" data-tap-toggle="false" data-theme='b'>         <a href="index.html" data-ajax="false"><i class='fa fa-bars'></i></a>         <h1>ejemplos de funciones nativas</h1>     </div>      <div data-role="content">         <div class='inset'>       <ul data-role="listview" data-inset="false" data-icon="false" data-divider-theme="b">         <li data-role="list-divider">funciones nativas <span class="ui-li-count">2</span></li>         <li><a href="#camara">             <img src="http://www.alfa-klebstoffe.com/fileadmin/icons/059270-3d-glossy-blue-orb-icon-people-things-camera.png">             <h2>camara</h2>             <p>prueba de ejecucion de camara en dispositivo movil</p>             <p class="ui-li-aside"><strong>hacer foto , guardar foto</strong></p>         </a></li>          <li><a href="#gps">           <img src="https://cdn3.iconfinder.com/data/icons/sphericalcons/128/satellite.png">           <h2>gps de android</h2>           <p>prueba de ejecucion del gps del movil</p>           <p class="ui-li-aside"><strong>probar gps</strong></p>           </a></li>          <li><a href="#googlemaps">           <img src="https://cdn2.iconfinder.com/data/icons/google-ios-7-app-icons/120/google_maps.png">               <h2>google maps</h2>           <p>pruebas sobre la app de google maps de android</p>           <p class="ui-li-aside"><strong>geolocalizacion</strong></p>         </a></li>          <li><a href="#conexion">           <img src="http://static.iconsplace.com/icons/preview/purple/wifi-256.png">           <h2>internet</h2>           <p>comprobacion conexion internet del movil</p>           <p class="ui-li-aside"><strong>wifi,3g</strong></p>           </a></li>       </ul>       </div>         </div>  </div>   <div  id="camara" data-role="page" data-theme='b'>      <div data-role="header" data-position="fixed" data-tap-toggle="false" data-theme='b'>         <a href="index.html" data-ajax="false"><i class='fa fa-bars'></i></a>         <h1>distintos usos de camara</h1>     </div>      <div data-role="content">      <div class='inset'>         <!-- <a data-role="button" href="" onclick="capturephoto();">capturar foto</a><br>         <a data-role="button" href="" onclick=" capturephotoedit();"> capturar foto editable</a><br>         <a data-role="button" href="" onclick="getphoto(picturesource.photolibrary);">from photo library</a><br>         <a data-role="button" href="" onclick="getphoto(picturesource.savedphotolibrary);">from photoalbum</a><br>         <img  id="smallimage" style="display:none;width:60px;height:60px;" src="" /> -->     <form>      <button data-role="button" onclick="prueba();return false;" ><i class='licon fa fa-refresh'></i>refrescar personal</button>    </form>          </div>     </div>   </div> </div>   <script src="js/jquery.mobile-1.4.3.min.js"></script> 

</body> 

like can see, in camara data-role page (the last one) added onclick event in button, next code:

   function prueba(){     alert("carlos limpiate los zapatos");  } -  

when open app , press button, applicacions returns home...so app can't read javascripts functions , dont know reason, need help.

thanks much,

borja

did call alert("carlos limpiate los zapatos"); directly on onclick event if work, may there problem js file.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -