logo

Response

« Return to the main article

You are viewing this page out of context. To see it in the context it is intended please click here.

About This Page

Reply posted by Gareth Hay on Wed 3 Oct 2001 in response to Control the look of Domino view tables

Better, faster views

Load the view into a javascript array...


[passthru HTML]<script>
[passthru HTML]function CustomObject(a,b,c,d){
[passthru HTML]this.a=a; this.b=b;
[passthru HTML]this.c=c; this.d=d;
[passthru HTML]}
[passthru HTML]thedata=new Array;
[embed a view*]
[passthru HTML]</script>


In the first column of the view


"thedata["+@DocNumber+"]=new
CustomObject(escape(\'"+@ReplaceSubstring(@ReplaceSubstring(FIELDWITHDATA;"\'";"
`");"\"";"`")+"\'),"


Subsequent columns


"escape(\'"+@ReplaceSubstring(@ReplaceSubstring(FIELDWITHMOREDATA;"\'";"`");"\""
;"`")+"\'),"


last column


"escape(\'"+LASTFIELDDATA+"\') );"


Now all your data is stored in a javascript array.


Using innerHTML methods you can display them in any order you want within a
table, or you can document.write a nice table with it.


The bonus is you can sort the array, so you can switch which column you sort by
faster, since you don't have to go back to a server.