Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4999] Android: WebView unable to Load jQuery from the project resource directory

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2017-06-02T19:00:59.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterJignesh Kasundra
AssigneeShak Hossain
Created2017-05-28T04:43:27.000+0000
Updated2017-06-02T19:01:00.000+0000

Description

unable to load jQuery from the project resource directory , however it working if loading from the remote location =================== Resources/app.js ==================

var win = Ti.UI.createWindow({
        title: 'mywin',
        backgroundColor: '#fff',
        width : Ti.UI.FILL,
        height : Ti.UI.FILL
});

win.open();

      


var regmainview = Ti.UI.createView({
	top : 0,
	bottom : 0,
	left : 0,
	right : 0,
	height : Ti.UI.FILL,
	width : Ti.UI.FILL,
	backgroundColor : '#fdd',
	visible : true
	
});

win.add(regmainview);


var tempwebview = Ti.UI.createWebView({
	 		width : Ti.UI.FILL,
	 		height : Ti.UI.FILL,
	 		url : 'temp.html'
 });
regmainview.add(tempwebview);
=================== Resources/temp.html jQuery location : Resources/jquery.min.jslocal ===================
<html>
<head>
<script src="/jquery.min.jslocal"></script>
<script>
$(document).ready(function(){
	try{
    $("p").click(function(){
        $(this).hide();
    });
   }catch(err){
   	alert(err);
   }
});
</script>
</head>
<body>

<p>If you click on me, I will disappear.</p>
<p>Click me away!</p>
<p>Click me too!</p>

</body>
</html>

Comments

  1. Jignesh Kasundra 2017-06-01

    Hello, Please close this issue. path related above issue got fixed

JSON Source