CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 display pictures in 3 columns and 3 rows

Print topic Send  topic

Author Message
maxa27
Posted: 04/20/2004, 8:36 AM


For example: I have 20 pictures in database and I want to display them in 3 columns and 3 rows per page (9 pictures per page).

I have try to edit html but I can display only in one row or only in one column.

The only example i have found is this one:

http://www.gotocode.com/art.asp?art_id=115

and it is for CC.

I need for CCS, ASP and mdb some example if exist.

Thx,
maxa27
peterr


Posts: 5971
Posted: 04/20/2004, 2:15 PM

I haven't looked at those examples in detail and don't know how helpful they are but I found one for CCS at http://www.gotocode.com/art.asp?art_id=189 . It's rated as "*****" therefore I hope it will work for you.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
maxa27
Posted: 04/23/2004, 2:42 AM

Hi,

http://www.gotocode.com/art.asp?art_id=189

The problem with this example is in line:
point = i /3

I get some error because i is not define.

But when i write folowing:
-----------------------------------
Dim point
Dim i

point = i/3
....

-----------------------------------

The i is always 0 - zero

So here is my working example and its working perfect for me:
------------------------------------------------------------------------------------------------
you have to set link to HTML

<!-- BEGIN Grid NewGrid1 -->
<font class="CobaltFormHeaderFont">NewGrid1</font>
<table class="" border="1" cellspacing="1" cellpadding="5" width="100%">

<!-- BEGIN Row --><a href="{Label1_Src}">{Label1}</a>

<td nowrap class="">{Label2} <input type="hidden" name="{Label4_Name}" value="{Label4}"></td>

<!-- END Row -->
<!-- BEGIN NoRecords -->
<!-- END NoRecords -->

</table>
<!-- END Grid NewGrid1 -->



Function NewGrid1_Label1_BeforeShow() 'NewGrid1_Label1_BeforeShow @6-AAA096FF

'Custom Code @16-73254650
' -------------------------
' Write your own code here.
Dim point
dim i

i = NewGrid1.Label4.value
point = i/4

'response.write "i: "& i & " point: " & InStr(point, ".") & "<br>"

if InStr(point, ".") = 0 then

NewGrid1.Label1.Value = "</tr><tr>"

else

NewGrid1.Label1.Value = ""

end if

i = i+1


' -------------------------
'End Custom Code

End Function 'Close NewGrid1_Label1_BeforeShow @6-54C34B28




Function NewGrid1_Label4_BeforeShow() 'NewGrid1_Label4_BeforeShow @14-2E03F892

'Custom Code @15-73254650
' -------------------------
' Write your own code here.
NewGrid1.Label4.value = NewGrid1.Label4.value + 1
' -------------------------
'End Custom Code

End Function 'Close NewGrid1_Label4_BeforeShow @14-54C34B28

------------------------------------------------------------------

I hope this will help someone,
maxa27
Mark
Posted: 04/29/2004, 9:24 PM

I got this to work:

Dim i
Dim rec_count
'BindEvents Method @1-7CA78C48
Sub BindEvents()
Set NetworkingMenu1.CCSEvents("BeforeShow") = GetRef("NetworkingMenu1_BeforeShow")
Set NetworkingMenu1.CCSEvents("BeforeShowRow") = GetRef("NetworkingMenu1_BeforeShowRow")
End Sub
'End BindEvents Method

Function NetworkingMenu1_BeforeShow() 'NetworkingMenu1_BeforeShow @78-DE002B8E

'Custom Code @81-73254650
' -------------------------
rec_count = CCdLookUp("count(*)", "NetworkingMenu", "1=1", DBConnect) -1
' -------------------------
'End Custom Code

End Function 'Close NetworkingMenu1_BeforeShow @78-54C34B28

Function NetworkingMenu1_BeforeShowRow() 'NetworkingMenu1_BeforeShowRow @78-21D6A5B3

'Custom Code @82-73254650
' -------------------------
if int(i/3) = i/3 then
if i = 0 then
EventCaller.TemplateBlock.Block("Row").Variable("open") = "<tr>"
else
EventCaller.TemplateBlock.Block("Row").Variable("open") = "</tr><tr>"
end if
else
EventCaller.TemplateBlock.Block("Row").Variable("open") = ""
end if

if i = rec_count then
EventCaller.TemplateBlock.Block("Row").Variable("close") = "</tr>"
else
EventCaller.TemplateBlock.Block("Row").Variable("close") = ""
end if
i=i+1
' -------------------------
'End Custom Code

End Function 'Close NetworkingMenu1_BeforeShowRow @78-54C34B28

:-D

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.