rivet Posted August 5, 2003 Posted August 5, 2003 does anyone have a good solution for displaying information in a grid format (3rows x 3 columns). thanks David
Leb i Sol Posted August 5, 2003 Posted August 5, 2003 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!
rivet Posted August 5, 2003 Author Posted August 5, 2003 ------------------------ rec1 | rec2 | rec3 rec4 | rec5 | rec6 rec7 | rec8 | rec9 ------------------------ Left to right is preferred. Thanks
PBainbridge Posted September 30, 2003 Posted September 30, 2003 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>
rivet Posted September 30, 2003 Author Posted September 30, 2003 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.
Garry Claridge Posted September 30, 2003 Posted September 30, 2003 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
PBainbridge Posted October 1, 2003 Posted October 1, 2003 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
Garry Claridge Posted October 1, 2003 Posted October 1, 2003 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
PBainbridge Posted October 2, 2003 Posted October 2, 2003 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
Garry Claridge Posted October 2, 2003 Posted October 2, 2003 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
PBainbridge Posted October 3, 2003 Posted October 3, 2003 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
Recommended Posts
This topic is 7792 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now