August 5, 200322 yr does anyone have a good solution for displaying information in a grid format (3rows x 3 columns). thanks David
August 5, 200322 yr Hi Rivet! what format/order exactly? eg. ----------------------- rec1 | rec4 | rec7 rec2 | rec5 | rec8 rec3 | rec6 | rec9 ------------------------- 1st thing that comes to my mind is using nested tables...some JS perhaps....post the format u need and perhaps we make a solution! All the best!
August 5, 200322 yr Author ------------------------ rec1 | rec2 | rec3 rec4 | rec5 | rec6 rec7 | rec8 | rec9 ------------------------ Left to right is preferred. Thanks
September 30, 200322 yr I am using the following javascript to display in columns but it only seems to work in IE. Both Netscape (4.7) and Safari just show a single row of records. Anyone have a cross-browser solution or a separate solution that works outside Explorer? <HEAD> <script language="javascript"> <!--- var count = 0 var howmany = 3 // ---> </script> </HEAD> <BODY> <TABLE><TR> [FMP-RECORD] <TD> [FMP-FIELD: Fieldname] </TD> <script language="javascript"> count = count + 1 if (count == howmany) {count = 0; document.write("</tr><tr>");} </script> [/FMP-RECORD] </TR> </TABLE> </BODY>
September 30, 200322 yr Author I am using the mod function now. [PostitionField]= Mod(Status(CurrentRecordNumber) - 1 ,9) + 1 This way the found set is number in multipule groups of 1-9 so when the page loads, your grid will have an if statement for each cell of your table.
September 30, 200322 yr This one works in Safari: <HEAD> <script language="javascript"> var count = 0 var howmany = 3 </script> </HEAD> <BODY> <TABLE><TR> <script language="javascript"> [FMP-RECORD] document.write("<TD> [FMP-FIELD: name] </TD>"); count++; if (count == 3) { count = 0; document.write("</tr><tr>"); } ; [/FMP-RECORD] </script> </TR> </TABLE> </BODY> It worked when I removed the Comments from the Script in the <head>. So do that first and your script may work. All the best. Garry
October 1, 200322 yr Thanks for both the suggestions. I'm afraid Garry's javascript hasn't worked for me - in fact I get no records displayed at all, with or without comments in the <head>. I am intrigued as to why it worked on your version of Safari and not mine though ( I'm using version 1.0 (v85)). I'll have a go with the mod function later to see if that does the trick. Phil
October 1, 200322 yr I'm using 1.0 (v85). What does the "View Source" look like? Can you see values in the document.write statements? How many times has the <script> content looped? Do you have a ; at the end of appropriate lines? Good Luck. Garry
October 2, 200322 yr The source code appears to be fine: the script has looped the correct number of times (12 in my case) and is returning values for all my FMP fields, but nothing in the document.write sections is visible. Sounds like a misplaced ; or something wrong with my html actually. From: <script language="javascript"> [FMP-RECORD] document.write("<TD WIDTH="160" VALIGN=top BGCOLOR="#FFFFFF"> <A HREF="javascript:Popup('[FMP-LinkRecID:format=record_detail.htm, layout=websearch]')" title="Details"><IMG SRC="[FMP-image: PICTURE]" WIDTH=156 HEIGHT=156 BORDER=0> </A> <CAPTION ALIGN="bottom"> [FMP-FIELD: NUMBER]</CAPTION> </TD>"); count++; if (count == 4) { count = 0; document.write("</tr><tr>"); } ; [/FMP-RECORD] the script is returning: document.write("<TD WIDTH="160" VALIGN=top> <IMG SRC="FMPro?-db=database.fp5&key=12595907&-img" WIDTH=156 HEIGHT=156 BORDER=0> <CAPTION ALIGN="bottom">15655</CAPTION> </TD>"); count++; if (count == 4) { count = 0; document.write("</tr><tr>"); } ; Thanks for your help on this. Phil
October 2, 200322 yr The quotes have been mixed-up. Try this: document.write("<TD WIDTH='160' VALIGN=top BGCOLOR='#FFFFFF'>"); document.write("<A HREF="javascript:Popup('[FMP-LinkRecID:format=record_detail.htm, layout=websearch]')" title="Details">"); document.write("<IMG SRC="[FMP-image: PICTURE]" WIDTH=156 HEIGHT=156 BORDER=0></A><CAPTION ALIGN="bottom"> [FMP-FIELD: NUMBER]</CAPTION></TD>"); Hopefully that should sort the quotes out All the best. Garry
October 3, 200322 yr Quotes all sorted - everything is now displaying as expected (although not in IE of course - I think this calls for some browser detection). Thanks for your help on this Garry
Create an account or sign in to comment