We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,085 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Html5 Database Issue

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
1 Month
Discussion Span
1 Year Ago
Last Updated
2
Views
praveen_dusari
Posting Whiz in Training
206 posts since Jun 2008
Reputation Points: 21
Solved Threads: 29
Skill Endorsements: 0

can you send entire code. That would be helpful

kws.mumbai
Newbie Poster
7 posts since Aug 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0573 seconds using 2.67MB