javascript - load Js file in HTML -


my first phonegap application includes 2 html files.

the first 1 named index.html uses index.js. file display list item. when click item in list, brings me detail.html file this:

   $.mobile.changepage("detail.html", { transition: "slideup"});  

or

   location.href = "detail.html"; 

on detail.html page, load detal.js. did not work. not use functions in detail.js.

please give me advise , there example ?

capture photo

    <link rel="stylesheet" href="css/jquery.mobile.structure-1.3.0.min.css" />     <link rel="stylesheet" href="css/jquery.mobile-1.3.0.min.css" />     <link rel="stylesheet" href="css/getabstract.min.css" />     <script src="js/jquery-1.9.0.min.js"></script>     <script src="js/jquery.mobile-1.3.0.min.js"></script>     <script src="js/jquery.ba-dotimeout.js"></script>     <script src="js/jquery.dst.js"></script>      <script type="text/javascript" charset="utf-8" src="js/cordova-2.5.0.js"></script>     <script type="text/javascript" charset="utf-8"></script>   </head> <body>      <div data-role = "page" data-theme = "a" id = "pagecontainer">         <!--start page header -->         <div data-role = "header" id = "pageheader" data-nobackbtn = "true" data-position = "fixed">             <h1>camera</h1>         </div>         <!--end page header -->          <!--start page content-->         <div data-role = "content" id= "pagecontent">             <a data-role = "button" id = "btncaptureedit" href = "">capture edit</a>             <a data-role = "button" id = "btnlibraryphoto" href = "">get photo library</a>             <a data-role = "button" id = "btnalbumphoto" href = "">get photo album</a>         </div>         <!--end page content-->          <!--start page footer-->         <div data-role = "footer" id = "pagefooter">         </div>         <!--end page footer-->      </div>     <script src="js/detail.js"></script>  </body>  </html> 

if detail.html don't see load detail.js? maybe this

<script src="js/index.js"></script> 

should this

<script src="js/detail.js"></script> 

?


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -