0

hi,
Iam developing the website in ipad,using html5 database and html5 concepts...i am facing trouble in integrating my website which is developied in php and xslt..here we are using soap to get the articles and displaying it using xslt and php...here iam loading those articles in html5 database in php page and redirecting to html page...

the problem is i have difficuly in dividing those articles based on languages..
:-/

<ul id="library"><li class="shelf"><ul class="covers">
<li class="cover">1 st article</li>
<li class="cover">2 st article</li><li class="cover">3 rd article</li>
</ul></li>
<li id="shelf_separator"><h2>General : Dutch newspapers</h2></li>
<li class="shelf"><ul class="covers">
<li class="cover">1 st article</li>
<li class="cover">2 st article</li><li class="cover">3 rd article</li>
</ul></li>
<li id="shelf_separator"><h2>General : French newspapers</h2></li>
</ul>

above is the code articles will come dynamic and here is what i have done...

<script id="movieTemplate" type="text/x-jquery-tmpl">
	<li class="cover"> <a href="#"><img alt="" src='data:image/jpeg;base64,${image}'></a>
	<div>
              <h3> ${name}</h3>
              </li>
		  </ul>
			   </div>
          </li> 
		
</script>

this is the jquery template and i inserted those articles into html5 database and updating it into this template

var dataobj=jQuery.makeArray($( "#movieTemplate" ).tmpl( movies ));
		var lengthof=jQuery.makeArray($( "#movieTemplate" ).tmpl( movies )).length;
		var library = $('#library');
		var currentShelf =  $('<li></li>').addClass("shelf");
		var covers = $("<ul></ul>").addClass("covers");
		
		for(var i=0;i<=lengthof;i++)
		{
			covers.append(dataobj[i]);
			if((i+1) % 6 == 0)
			{
				currentShelf.append(covers)
				library.append(currentShelf);
				library.append('<li id="shelf_separator"><h2>General : Dutch newspapers</h2></li>');
				currentShelf =  $('<li></li>').addClass("shelf");
				covers = $("<ul></ul>").addClass("covers");
			}
			
		}

where values of movies which comes from html5 database is

var movies = [
  { Name: "The Red Violin", language: "dutch", },
  { Name: "Eyes Wide Shut", language: "dutch",},
  { Name: "The Inheritance", language: "french" }
  ];

can anyone please help me out...

2
Contributors
1
Reply
3
Views
5 Years
Discussion Span
Last Post by kws.mumbai
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.