1.11M Members

Html5 Database Issue

 
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...

 
0
 

can you send entire code. That would be helpful

Isn't it about time forums rewarded their contributors?

Earn rewards points for helping others. Gain kudos. Cash out. Get better answers yourself.

It's as simple as contributing editorial or replying to discussions labeled or OP Kudos

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