I've got a little 5 image display thing with a button to see the next 5.
if say someone hits the next button and there are only 2 more images to show, the next two are shown but after that the JavaScript crashes
Is there a way I can check to see if the next item I'm trying to get exists or not
here is what I'm using to get the item from the DB and "genre_count" is my image counter for displaying image 1,2,3...
......
film_list = tx.executeSql('SELECT * FROM mydb WHERE genre = "Drama"');
.....
...
film_item = film_list.rows.item(genre_count).image
return film_item
Can I do something like this pseudo code
if (film_list.rows.item(genre_count).image === empty)
film_item=""
else
film_item = film_list.rows.item(genre_count).image