Hi Guys,
I just started working one of the application usng tizen(web) and got stuck with following thing. I have implemeted ui-listview which have some "li's" so it does display correctly (See following code). However, when i tried to get the selcted item from listvewi using javascript then it doesn't display anything. For example,if user selects "1line" from the list so it should say "1line" is selected. Wondering, if any other way exists in Tizen to achive this thing.
Reference Link of example:https://developer.tizen.org/development/api-references/web-application?redirect=https://developer.tizen.org/dev-guide/2.3.1/org.tizen.web.apireference/html/ui_fw_api/wearable/widgets/widget_list.htm
Here is code snippter of javascript the one i'm using
<script type="text/javascript">
$('#dynamicList li').click(function(){
//console.log($(this).attr('data-input'));
alert($(this).attr('data-value')); // this will alert data-input value.
});
</script>
Here is complete code snippter to display listview
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,user-scalable=no">
<title>Testing Application</title>
<link rel="stylesheet" href="lib/tau/wearable/theme/default/tau.min.css">
<link rel="stylesheet" media="all and (-tizen-geometric-shape: circle)" href="lib/tau/wearable/theme/default/tau.circle.min.css">
<!-- load theme file for your application -->
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="lib/tau/wearable/js/tau.min.js"></script>
<script src="app.js"></script>
<script src="lowBatteryCheck.js"></script>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery.js" type="text/javascript"></script>
<!-- <script src="js/orderProcesing.js" type="text/javascript"></script> -->
</head>
<script type="text/javascript">
$('#dynamicList li').click(function(){
//console.log($(this).attr('data-input'));
alert($(this).attr('data-value')); // this will alert data-input value.
});
</script>
<body>
<div class="ui-page ui-page-active" id="main">
<header class="ui-header">
<h2 class="ui-title">Orders List</h2>
</header>
<ul class="ui-listview" id="dynamicList">
<li>
<a href="#" data-value="S">1line</a>
</li>
<li>
<a href="#" data-value="M">2line</a>
</li>
<li>
<a href="#" data-value="L">3line</a>
</li>
<li>
<a href="#" data-value="S1">4line</a>
</li>
<li>
<a href="#" data-value="S2">5line</a>
</li>
</ul>
</div>
</body>
</html>