cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francesco Negri (JIRA)" <>
Subject [jira] [Created] (CB-8275) Issue updating index.html at runtime‏
Date Thu, 08 Jan 2015 11:43:35 GMT
Francesco Negri created CB-8275:

             Summary: Issue updating index.html at runtime‏ 
                 Key: CB-8275
             Project: Apache Cordova
          Issue Type: Bug
          Components: WP8
    Affects Versions: 3.5.0
         Environment: Visual Studio Community 2013 with Tools for Apache Cordova CTP3.0 
            Reporter: Francesco Negri
            Assignee: Jesse MacFadyen
            Priority: Critical

We'd like to report some issues we are facing developing a Cordova app with Visual Studio
Community 2013 adding new code lines in index.html file at runtime in Windows Phone 8.1. It
seems that only HTML tags are correctly read and executed, instead JS (included in a <script>
tag or directly in the element tag e.g. using onclick event) is not executed. We ran the same
project on both the Android emulator and  physical device and it worked perfectly. Does anybody
know wether it's a compatibility issue or something else? Thank you for your attention and

The code is:


 <!DOCTYPE html>



    <meta charset="utf-8" />


    <link href="css/index.css" rel="stylesheet" />



    <input type="button" id="test" value="Prova x Emulatore wp" />

    <!-- Cordova reference, this is added to your app when it's built. -->

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

    <script src="scripts/platformOverrides.js"></script>

    <script src="scripts/jquery-2.1.1.min.js"></script>

    <script id="last_script" src="scripts/index.js"></script>




(function () {

    "use strict";

    document.addEventListener( 'deviceready', onDeviceReady.bind( this ), false );

    var logOb;

    function onDeviceReady() {


        // Handle the Cordova pause and resume events

        document.addEventListener( 'pause', onPause.bind( this ), false );

        document.addEventListener('resume', onResume.bind(this), false);

        document.getElementById('test').addEventListener('click', function () {

            var el1 = '<input type="button" id="Prova" value="Ciao"/>',

                el2 = '<script type="text/javascript">document.getElementById(\'Prova\').addEventListener(\'click\',
function(){navigator.notification.alert(\'Ciao sono il bottone\')}, false);</script>';



        }, false);

        // TODO: Cordova has been loaded. Perform any initialization that requires Cordova

    function onResume() { };
    function onPause() { };

} )();

The TrialCode Team.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message