Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Script worked partially; onclick events still don't work #30

Open
andreszs opened this issue Aug 14, 2016 · 1 comment
Open

Script worked partially; onclick events still don't work #30

andreszs opened this issue Aug 14, 2016 · 1 comment

Comments

@andreszs
Copy link

andreszs commented Aug 14, 2016

Hi, I have this meta tag in the header in order to allow all type of scripts to run:

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src * data: 'unsafe-inline'; connect-src * 'unsafe-inline'; frame-src *" />

Yet all the onclick events from dynamically generated (with jQuery) objects with this method:

$('#frm_login').append('<button class="uibutton blue" id="btn_login" onclick="javascript:doLogin()">Login</button>');

are failing miserably. They do worked when using the old WP8 platform in Cordova, but not anymore with the Windows platform when compiled for WP8 (appx).

Notice the .append() method works now thanks to the winstore-jscompat.js file, but not the events. This is really frustrating, I'm about to return to the discontinued WP8 platform unless I find a solution soon. Thanks in advance for your cooperation.

@merbin2012
Copy link

@andreszs Did you find the solution? Please give it, if you found.
I found one thing, the onclick attribute is replaced to x-onclick.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants