CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Elena multiple grid example not working in asp?

Print topic Send  topic

Author Message
need help
Posted: 06/03/2002, 6:24 AM

I can't get Elena's example to work in asp.
http://gotocode.com/art.asp?art_id=115&
I get a regular column grid with all 9 items vertically instead of 3x3

I am try to make an image gallery anyone make one yet?
Elena
Posted: 06/03/2002, 8:15 AM

Hello,
most probably you use template pattern while example is built for non template (as was mentioned in the article).
Please refer to following thread:
http://www.gotocode.com/disc_viewt.asp?mid=5712

You'll find link for template example (with PHP and ASP events) and explanation
still need help
Posted: 06/03/2002, 10:56 AM

Still no luck. I am using the ccs from your site as described in previous messages on the subject. I am opening page.html and editing it to reflect
<!--BeginDListForm1-->
{open}
<td {DataTD}><font {DataFONT}>{name} </font></td>
<!--EndDListForm1-->

Any other ideas?

Remember this is asp w/templates

Thanks
Elena
Posted: 06/03/2002, 11:26 PM

Elena
Posted: 06/03/2002, 11:26 PM

Hello,
all you need to do is to generate project you've downloaded for ASP+Templates pattern, open generated page.html and edit code to get:
<!--BeginDListForm1-->
{open}
<td {DataTD}><font {DataFONT}>{name} </font></td>
<!--EndDListForm1-->

It should work.
Could you provide a link to your Page.asp I can take a look at it.

help
Posted: 06/04/2002, 5:29 AM

I have it on my dev box, I'll try to find some space. thanks
help
Posted: 06/04/2002, 6:06 AM

here is the page I can't get working.

http://www.site314/page.asp
help
Posted: 06/04/2002, 6:15 AM

oops I meant www.site314.com/page.asp
Elena
Posted: 06/04/2002, 6:17 AM

Please check what decimal separator is used on your system. The example was created for comma (",") separator. You can see it on Page page/Form1 form in Custom Show event. In case other separator is used (e.g. dot ".") please change it there.
help
Posted: 06/04/2002, 6:34 AM

How do i ind that out?
Nicole
Posted: 06/04/2002, 6:47 AM

Hello,
open Control Panel, select Regional Options. Go to Number tab and check value in Decimal Symbol list.
help
Posted: 06/04/2002, 6:59 AM

it's "." as your example. I tried both ways just to double check and no luck.
Just want to also say thanks in advance for helping.
help
Posted: 06/04/2002, 6:59 AM

it's "." as your example. I tried both ways just to double check and no luck.
Just want to also say thanks in advance for helping.
help
Posted: 06/05/2002, 6:02 AM

Give up Elena?

Anybody have a way to diplay grid like info or have a thumbnail gallery made?
Jurjen Roels
Posted: 06/05/2002, 2:28 PM

Hi,

haven't done that in ccs yet. But i didit in codecharge.

What i did was:

Creating a table in a database called: photo with the following things:

date, file_name, file_size, file_description, title, etc..

I used the upload example from gotocode to upload the picture to the server.

On displaying the gallery i did the following:

I created a normal grid, using a custom SQL statement, showing only {foto_id}

Then i build up my own show event. Replacing the id with custom html code

This is the code:

function rr_foto_show()
{
global $tpl;
global $db;
$sFormTitle = "Klik op een foto.";

//-------------------------------
// rr_foto Open Event begin
// rr_foto Open Event end
//-------------------------------

//-------------------------------
// Set URLs
//-------------------------------
$fldfoto_id = "";

//-------------------------------
// rr_foto CustomShow Event begin
$sSQL = "select r.foto_datum as r_foto_datum, " .
"r.foto_description as r_foto_description, " .
"r.foto_file as r_foto_file, " .
"r.foto_id as r_foto_id " .
" from rr_foto r ";


$db->query($sSQL);
$next_record = $db->next_record();
$counter=0;
$myhtml="<table><tr>\n" ;
while($next_record)
{
//-------------------------------
// Create field variables based on database fields
//-------------------------------
$myfldfoto_datum = $db->f("r_foto_datum");
$myfldfoto_description = $db->f("r_foto_description");
$myfldfoto_file = $db->f("r_foto_file");
$myfldfoto_id = $db->f("r_foto_id");
$counter= $counter +1;

if ($counter < 5)
{
$myhtml=$myhtml . "<td><a href=foto_single.php?foto_id=".$myfldfoto_id."><img src=.".$myfldfoto_file." height=100 border=0></a></td>\n";
}
else
{
$myhtml=$myhtml . "<td><a href=foto_single.php?foto_id=".$myfldfoto_id."><img src=.".$myfldfoto_file." height=100 border=0></a></td>\n</tr>\n<tr>\n";
$counter=0;
}
$next_record = $db->next_record();

}
$myhtml=$myhtml ."</tr></table>\n";
//-------------------------------

$tpl->set_var("FormTitle", $sFormTitle);

//-------------------------------
// Show fields
//-------------------------------
$tpl->set_var("foto_id", $myhtml);
$tpl->parse("Formrr_foto", false);

//-------------------------------
// rr_foto CustomShow Event end
Elena
Posted: 06/06/2002, 2:14 AM

Hello,
lets try to debug the code. Open custom SHow event and find line:
'response.write "i: "& i & " point: " & InStr(point, ".") & "<br>"

uncomment it and add following line right after it:
response.write "i: "& i & " point: " & InStr(point, ",") & "<br>"

Generate page and run it. Let me know what was printed in browser.
spaceclown
Posted: 06/06/2002, 5:31 AM

All done. results are at www.site314.com/page.asp
Still no multiple grids.
spaceclown
Posted: 06/06/2002, 6:03 AM

I don't now what happenned but it is working now. I am confused but it works thanks Elena.

Here is the code, I think it's the same as your example.

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

if InStr(point, ".") = 0 then
SetVar "open", "</tr><tr>"
else
SetVar "open", ""
end if
SetVar "name", ToHTML(fldname)
Parse "DListForm1", True


i = i+1
spaceclown
Posted: 06/11/2002, 12:03 PM

Hi I can't get my images to display correct with the split grid. I am getting 2 of each image and it looks like the following. I also can't make the page navigation to work.

AABBC
C
DDEEF
F
GGHHI
I
JJKKL

Here is what is in my form. (only filed is image_url)

EVENTS TAB
open
i = 0

before show

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

if InStr(point, ".") = 0 then
SetVar "open", "</tr><tr>"
else
SetVar "open", ""
end if

SetVar "fldimage_url", ToHTML(fldimage_url)
Parse "DListForm1", True


i = i+1


fldimage_url="<img border=""0"" width=""95"" src=""" & fldimage_url & """/>"




Any Ideas?
spaceclown
Posted: 06/11/2002, 12:03 PM

Hi I can't get my images to display correct with the split grid. I am getting 2 of each image and it looks like the following. I also can't make the page navigation to work.

AABBC
C
DDEEF
F
GGHHI
I
JJKKL

Here is what is in my form. (only filed is image_url)

EVENTS TAB
open
i = 0

before show

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

if InStr(point, ".") = 0 then
SetVar "open", "</tr><tr>"
else
SetVar "open", ""
end if

SetVar "fldimage_url", ToHTML(fldimage_url)
Parse "DListForm1", True


i = i+1


fldimage_url="<img border=""0"" width=""95"" src=""" & fldimage_url & """/>"




Any Ideas?
tim
Posted: 06/11/2002, 12:29 PM

I cant get my images to show up correctly.
They look like

AABBC <--- letters represent images
C
DDEEF
F
GGHHI
I
JJKKL

Here is the code in my form. (only field is image_url) oh ya the navigation doesnt work either

EVENTS

OPEN

i = 0

BEFORE SHOW

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

if InStr(point, ".") = 0 then
SetVar "open", "</tr><tr>"
else
SetVar "open", ""
end if

SetVar "fldimage_url", ToHTML(fldimage_url)
Parse "DListForm1", True


i = i+1


fldimage_url="<img border=""0"" width=""95"" src=""" & fldimage_url & """/>"


I edite the html, took away the <tr></tr> and put {open}

   


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.