Forums

This topic is locked

Displaying odd numbers of records

Posted 18 Oct 2003 09:56:13
1
has voted
18 Oct 2003 09:56:13 Simon Kemp posted:
I'm currently working on the best way to display records (products in a shop) but am encountering problems when there are an odd number of records

Basically I have a table to display each record - description on left, picture on right. price underneath (nothing clever) I want to alternate this with another table for the next product with the picture on the left and the description on the right - just to make the results look a bit better

I can achieve this using a MoveNext command in between the two tables and then a repeat region over both tables - but only if there is an even number of records, an odd number gives the EOF, BOF error meassage. I can see why but I can't figure out how to tell the code to only show the second table in the repeat region if there is a record to put in it!

I've tried everything I know but am having no luck - any help would be greatly appreciated

(I'm using Dreamweaver MX but am not worried about adding code by hand if necessary)
<font face='Verdana'></font id='Verdana'>

Replies

Replied 20 Oct 2003 12:08:56
20 Oct 2003 12:08:56 Janusz Jasinski replied:
Hi,

I did this for one of my MSc projects, I shall try and dig it out for you. Just thought I'd let you know that at least one person's on the case!

Janusz

======================
janusz.monkey-it.co.uk
Replied 20 Oct 2003 12:19:14
20 Oct 2003 12:19:14 Simon Kemp replied:
Cheers mate, I'm still going round in circles!
Replied 20 Oct 2003 12:34:41
20 Oct 2003 12:34:41 Janusz Jasinski replied:
Hi,

Sent a file to your e-mail. Did you use: Insert -&gt; Media -&gt; Flash?

You can right align the cell, the table and the image. You can set the properites of the flash object to be right aligned.

Dammit, everytime I put some code in, it renders the HTML. E-mail me at:

Janusz

======================
janusz.monkey-it.co.uk
Replied 20 Oct 2003 12:37:54
20 Oct 2003 12:37:54 Janusz Jasinski replied:
Tit!

Wrong thread, have sent you some code though.

Janusz

======================
janusz.monkey-it.co.uk
Replied 21 Oct 2003 10:27:06
21 Oct 2003 10:27:06 Simon Kemp replied:
Thanks - not received anything though...
Replied 21 Oct 2003 19:02:49
21 Oct 2003 19:02:49 Janusz Jasinski replied:
Hmm,

Can you tell it something like, if empty, do nothing/stop processing. Couldn't tell you off hand, but look around for this sort of thing on google. I think you need to say, if next record is empty, stop processing - or "jump" to next bit of relevant code.

Janusz

======================
janusz.monkey-it.co.uk

Reply to this topic