vinodxx Posted December 13, 2008 Share Posted December 13, 2008 Hello friends,This is my first ever webapp in google app engine.Search for zipcode,city county, latitude and longitude.http://zipcodesearch.appspot.com/Table styling is using jquery.Can I use other type of table styling to increase speed.Please comment on this site.Regards,Vinod Link to comment Share on other sites More sharing options...
inktherapy Posted December 15, 2008 Share Posted December 15, 2008 As far as I know <div> renders faster than <table>. hmmm?! Link to comment Share on other sites More sharing options...
vinodxx Posted December 29, 2008 Author Share Posted December 29, 2008 Is there any CSS techniques to color alternate rows. Link to comment Share on other sites More sharing options...
jimgilbert Posted December 29, 2008 Share Posted December 29, 2008 I got this from Wicked Cool PHP (William Steinmetz with Brian Ward). I have not tested it yet. <html><head><style>tr.row1 { background-color: gray;}tr.row2 { background-color: white;}</style></head><body><?php $db = mysql_connect("localhost", "username", "password");mysql_select_db("wcphp", $db);function table_row_format(&$row_counter) { // Returns row class for a row if ($row_counter & 1) { $row_color = "row2"; } else { $row_color = "row1"; } $row_counter++; return $row_color; }// Sample SQL query$sql = "SELECT product_name FROM product_info";$result = @mysql_query($sql, $db) or die;echo "<table>";$i = 0;while($row = mysql_fetch_array($result)) { /* print results */ $row_class = table_row_format($i); echo "<tr class=\"$row_class\"><td>$row[product_name]</td></tr>";}echo "</table>";?></body></html> If you google it you can quickly get to where you can download the code from the book. Jim Link to comment Share on other sites More sharing options...
Skemcin Posted December 29, 2008 Share Posted December 29, 2008 Turn this into a web service and I'd drop the need to render anything.:)But, if you really want some feedback - plug the longitude and latitude into google maps and plot the location on the map for the person. Embed the information you have in the popup inner html that google maps lets do.Here is an example of what I'm talking about:http://www.deepcreekinns.com/map-popup.cfmAll in all, using a div is gonna produce the quickest results.P.S. I'd only put google ads below the results - not before and after - just makes the app annoying to use, in my opinion. Link to comment Share on other sites More sharing options...
clonetrooper9494 Posted January 6, 2009 Share Posted January 6, 2009 I would suggest adding AJAX suggestion thing, so if they misspell something while typing, it will correct suggest a list of possible answers, like if I type in Wisvonsin, a small box should appear underneath the input saying Wisconsin... just a thought. Its pretty cool though, nice job!EDIT: also fix it so if the user inputs a blank string, it tells them to fill in the input instead of an error. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.