1,105,391 Community Members

Html5 Database Issue

Member Avatar
praveen_dusari
Posting Whiz in Training
206 posts since Jun 2008
Reputation Points: 11 [?]
Q&As Helped to Solve: 29 [?]
Skill Endorsements: 0 [?]
 
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...

Member Avatar
kws.mumbai
Newbie Poster
7 posts since Aug 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

can you send entire code. That would be helpful

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: