CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 imagelink component

Print topic Send  topic

Author Message
guest
Posted: 07/11/2003, 10:45 AM

This is a multi-part message in MIME format.

------=_NextPart_000_00EF_01C347AA.40303760
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

PHP & MySQL
I am having a problem getting an image to display on an imagelink control.
The control is inside a grid. The sql for the grid is as follows:

SELECT id AS r_id, image_url AS r1_image_url
FROM re_inventory r INNER JOIN re_invimages r1 ON r.id = r1.img_id
WHERE ( featured='Y' )

The name of the Form is Featured. This returns the ID and image file
name( i.e. 1, frontview.jpg). For whatever reason the path is stripped since
the field image_url actually contains "images/inventory/frontview.jpg". The
href is built correctly. The name of the imagelink on the form is
primaryimg. The "src" under the format tab is {primaryimg_Src} and this also
appears in the html as:

<td class="CobaltDataTD"><a class="CobaltDataLink" href="{primaryimg}"><img
class="CobaltInput" src="{primaryimg_Src}" border="0"></a> </td>

.. In the before show event, I am trying to point this to the correct
location of the image with this code:


$Featured->primaryimg_Src->SetValue("images/inventory/".$Featured->primaryim
g->GetValue());

Here is the error I am getting:

Fatal error: Call to a member function on a non-object in
E:\TestWEB\openre\Main_events.php on line 19

I have searched the tips and forums for a solution but haven't been able to
find one. Can anyone point me in the right direction? It seems to me that I
should be able to do this at design time instead of runtime or maybe I am
not understanding how the imagelink control is supposed to work. Any help is
greatly appreciated. Thanks in advance.

------=_NextPart_000_00EF_01C347AA.40303760
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>PHP & MySQL</FONT></DIV>
<DIV><FONT face=3DArial>I am having a problem getting an image to =
display on an=20
imagelink control. The control is inside a grid. The sql for the grid is =
as=20
follows:</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>SELECT id AS r_id, image_url AS r1_image_url =
<BR>FROM=20
re_inventory r INNER JOIN re_invimages r1 ON r.id =3D r1.img_id<BR>WHERE =
(=20
featured=3D'Y' )</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>The name of the Form is Featured. This =
returns  the=20
ID and image file name( i.e. 1, frontview.jpg). For whatever reason the =
path is=20
stripped since the field image_url actually contains=20
"images/inventory/frontview.jpg".  The href is built correctly. The =
name of=20
the imagelink on the form is primaryimg. The "src" under the format tab =
is=20
{primaryimg_Src} and this also appears in the html as:</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial><td class=3D"CobaltDataTD"><a=20
class=3D"CobaltDataLink" href=3D"{primaryimg}"><img =
class=3D"CobaltInput"=20
src=3D"{primaryimg_Src}" border=3D"0"></a>&nbsp;</td> =

</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>. In the before show event, I am trying to point =
this to=20
the correct location of the image with this code: </FONT></DIV>
<DIV> </DIV>
<DIV> <FONT=20
face=3DArial>$Featured->primaryimg_Src->SetValue("images/inventory/=
".$Featured->primaryimg->GetValue());</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>Here is the error I am getting:</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><STRONG>Fatal error</STRONG>: Call to a member function on a =
non-object in=20
<B>E:\TestWEB\openre\Main_events.php</B> on line <B>19</B><BR></DIV>
<DIV><FONT face=3DArial>I have searched the tips  and forums for a =
solution=20
but haven't been able to find one. Can anyone point me in the right =
direction?=20
It seems to me that I should be able to do this at design time instead =
of=20
runtime or maybe I am not understanding how the imagelink control is =
supposed to=20
work. Any help is greatly appreciated. Thanks in advance.</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV></BODY></HTML>

------=_NextPart_000_00EF_01C347AA.40303760--
Carl Joshi
Posted: 07/11/2003, 10:50 AM

Hello dsafar

I think you need to declare your globals as
Global $Featured;
before you can access it in an event


<dontspamme_dsafar@hotmail.com> wrote in message
news:bemt3o$j19$1@news.codecharge.com...
PHP & MySQL
I am having a problem getting an image to display on an imagelink control.
The control is inside a grid. The sql for the grid is as follows:

SELECT id AS r_id, image_url AS r1_image_url
FROM re_inventory r INNER JOIN re_invimages r1 ON r.id = r1.img_id
WHERE ( featured='Y' )

The name of the Form is Featured. This returns the ID and image file
name( i.e. 1, frontview.jpg). For whatever reason the path is stripped since
the field image_url actually contains "images/inventory/frontview.jpg". The
href is built correctly. The name of the imagelink on the form is
primaryimg. The "src" under the format tab is {primaryimg_Src} and this also
appears in the html as:

<td class="CobaltDataTD"><a class="CobaltDataLink" href="{primaryimg}"><img
class="CobaltInput" src="{primaryimg_Src}" border="0"></a> </td>

.. In the before show event, I am trying to point this to the correct
location of the image with this code:


$Featured->primaryimg_Src->SetValue("images/inventory/".$Featured->primaryim
g->GetValue());

Here is the error I am getting:

Fatal error: Call to a member function on a non-object in
E:\TestWEB\openre\Main_events.php on line 19

I have searched the tips and forums for a solution but haven't been able to
find one. Can anyone point me in the right direction? It seems to me that I
should be able to do this at design time instead of runtime or maybe I am
not understanding how the imagelink control is supposed to work. Any help is
greatly appreciated. Thanks in advance.

guest
Posted: 07/11/2003, 11:07 AM

This is a multi-part message in MIME format.

------=_NextPart_000_0119_01C347AD.6F7D1AD0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I got the image to display by changing

$Featured->primaryimg_Src->SetValue("images/inventory/".$Featured->primaryim
g->GetValue());

to

$Featured->primaryimg->SetValue("images/inventory/".$Featured->primaryimg->G
etValue());

Since database contains "images/inventory/frontview.jpg", I don't understand
why CCS strips the "images/inventory/" and returns "frontview.jpg" only.
When manually running the sql, it works like is should, so I am assuming CCS
strips it.
<dontspamme_dsafar@hotmail.com> wrote in message
news:bemt3o$j19$1@news.codecharge.com...
PHP & MySQL
I am having a problem getting an image to display on an imagelink control.
The control is inside a grid. The sql for the grid is as follows:

SELECT id AS r_id, image_url AS r1_image_url
FROM re_inventory r INNER JOIN re_invimages r1 ON r.id = r1.img_id
WHERE ( featured='Y' )

The name of the Form is Featured. This returns the ID and image file
name( i.e. 1, frontview.jpg). For whatever reason the path is stripped since
the field image_url actually contains "images/inventory/frontview.jpg". The
href is built correctly. The name of the imagelink on the form is
primaryimg. The "src" under the format tab is {primaryimg_Src} and this also
appears in the html as:

<td class="CobaltDataTD"><a class="CobaltDataLink"
href="{primaryimg}"><img class="CobaltInput" src="{primaryimg_Src}"
border="0"></a> </td>

. In the before show event, I am trying to point this to the correct
location of the image with this code:


$Featured->primaryimg_Src->SetValue("images/inventory/".$Featured->primaryim
g->GetValue());

Here is the error I am getting:

Fatal error: Call to a member function on a non-object in
E:\TestWEB\openre\Main_events.php on line 19

I have searched the tips and forums for a solution but haven't been able
to find one. Can anyone point me in the right direction? It seems to me that
I should be able to do this at design time instead of runtime or maybe I am
not understanding how the imagelink control is supposed to work. Any help is
greatly appreciated. Thanks in advance.

------=_NextPart_000_0119_01C347AD.6F7D1AD0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>I got the image to display by =
changing</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT=20
face=3DArial>$Featured->primaryimg_Src->SetValue("images/inventory/=
".$Featured->primaryimg->GetValue());</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>to</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT=20
face=3DArial>$Featured->primaryimg->SetValue("images/inventory/".$F=
eatured->primaryimg->GetValue());</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>Since database contains =
"images/inventory/frontview.jpg",=20
I don't understand why CCS strips the "images/inventory/" and returns=20
"frontview.jpg" only. When manually running the sql, it works like is =
should, so=20
I am assuming CCS strips it. </FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><<A=20
=
href=3D"mailto:dontspamme_dsafar@hotmail.com">dontspamme_dsafar@hotmail.c=
om</A>>=20
wrote in message <A=20
=
href=3D"news:bemt3o$j19$1@news.codecharge.com">news:bemt3o$j19$1@news.cod=
echarge.com</A>...</DIV>
<DIV><FONT face=3DArial>PHP & MySQL</FONT></DIV>
<DIV><FONT face=3DArial>I am having a problem getting an image to =
display on an=20
imagelink control. The control is inside a grid. The sql for the grid =
is as=20
follows:</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>SELECT id AS r_id, image_url AS r1_image_url =
<BR>FROM=20
re_inventory r INNER JOIN re_invimages r1 ON r.id =3D =
r1.img_id<BR>WHERE (=20
featured=3D'Y' )</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>The name of the Form is Featured. This =
returns  the=20
ID and image file name( i.e. 1, frontview.jpg). For whatever reason =
the path=20
is stripped since the field image_url actually contains=20
"images/inventory/frontview.jpg".  The href is built correctly. =
The name=20
of the imagelink on the form is primaryimg. The "src" under the format =
tab is=20
{primaryimg_Src} and this also appears in the html as:</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial><td class=3D"CobaltDataTD"><a=20
class=3D"CobaltDataLink" href=3D"{primaryimg}"><img =
class=3D"CobaltInput"=20
src=3D"{primaryimg_Src}" =
border=3D"0"></a>&nbsp;</td>=20
</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>. In the before show event, I am trying to =
point this to=20
the correct location of the image with this code: </FONT></DIV>
<DIV> </DIV>
<DIV> <FONT=20
=
face=3DArial>$Featured->primaryimg_Src->SetValue("images/inventory/=
".$Featured->primaryimg->GetValue());</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>Here is the error I am getting:</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><STRONG>Fatal error</STRONG>: Call to a member function on a =
non-object=20
in <B>E:\TestWEB\openre\Main_events.php</B> on line =
<B>19</B><BR></DIV>
<DIV><FONT face=3DArial>I have searched the tips  and forums for =
a solution=20
but haven't been able to find one. Can anyone point me in the right =
direction?=20
It seems to me that I should be able to do this at design time instead =
of=20
runtime or maybe I am not understanding how the imagelink control is =
supposed=20
to work. Any help is greatly appreciated. Thanks in =
advance.</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0119_01C347AD.6F7D1AD0--
Carl Joshi
Posted: 07/11/2003, 11:28 AM

Definitely strange behaviour, will do some tests

<dontspamme_dsafar@hotmail.com> wrote in message
news:bemudl$ks9$1@news.codecharge.com...
I got the image to display by changing

$Featured->primaryimg_Src->SetValue("images/inventory/".$Featured->primaryim
g->GetValue());

to

$Featured->primaryimg->SetValue("images/inventory/".$Featured->primaryimg->G
etValue());

Since database contains "images/inventory/frontview.jpg", I don't understand
why CCS strips the "images/inventory/" and returns "frontview.jpg" only.
When manually running the sql, it works like is should, so I am assuming CCS
strips it.
<dontspamme_dsafar@hotmail.com> wrote in message
news:bemt3o$j19$1@news.codecharge.com...
PHP & MySQL
I am having a problem getting an image to display on an imagelink control.
The control is inside a grid. The sql for the grid is as follows:

SELECT id AS r_id, image_url AS r1_image_url
FROM re_inventory r INNER JOIN re_invimages r1 ON r.id = r1.img_id
WHERE ( featured='Y' )

The name of the Form is Featured. This returns the ID and image file
name( i.e. 1, frontview.jpg). For whatever reason the path is stripped since
the field image_url actually contains "images/inventory/frontview.jpg". The
href is built correctly. The name of the imagelink on the form is
primaryimg. The "src" under the format tab is {primaryimg_Src} and this also
appears in the html as:

<td class="CobaltDataTD"><a class="CobaltDataLink" href="{primaryimg}"><img
class="CobaltInput" src="{primaryimg_Src}" border="0"></a> </td>

.. In the before show event, I am trying to point this to the correct
location of the image with this code:


$Featured->primaryimg_Src->SetValue("images/inventory/".$Featured->primaryim
g->GetValue());

Here is the error I am getting:

Fatal error: Call to a member function on a non-object in
E:\TestWEB\openre\Main_events.php on line 19

I have searched the tips and forums for a solution but haven't been able to
find one. Can anyone point me in the right direction? It seems to me that I
should be able to do this at design time instead of runtime or maybe I am
not understanding how the imagelink control is supposed to work. Any help is
greatly appreciated. Thanks in advance.

dsafar
Posted: 07/12/2003, 8:10 PM

This is a multi-part message in MIME format.

------=_NextPart_000_00D4_01C348C1.DE9858C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

The problem was in the ODBC connection pointing to an older version of =
the database without the fullpath in the file. Boy do I feel stupid!! =
:-)
<dontspamme_dsafar@hotmail.com> wrote in message =
news:bemt3o$j19$1@news.codecharge.com...
PHP & MySQL
I am having a problem getting an image to display on an imagelink =
control. The control is inside a grid. The sql for the grid is as =
follows:

SELECT id AS r_id, image_url AS r1_image_url=20
FROM re_inventory r INNER JOIN re_invimages r1 ON r.id =3D r1.img_id
WHERE ( featured=3D'Y' )

The name of the Form is Featured. This returns the ID and image file =
name( i.e. 1, frontview.jpg). For whatever reason the path is stripped =
since the field image_url actually contains =
"images/inventory/frontview.jpg". The href is built correctly. The name =
of the imagelink on the form is primaryimg. The "src" under the format =
tab is {primaryimg_Src} and this also appears in the html as:

<td class=3D"CobaltDataTD"><a class=3D"CobaltDataLink" =
href=3D"{primaryimg}"><img class=3D"CobaltInput" =
src=3D"{primaryimg_Src}" border=3D"0"></a> </td>=20

. In the before show event, I am trying to point this to the correct =
location of the image with this code:=20

=
$Featured->primaryimg_Src->SetValue("images/inventory/".$Featured->primar=
yimg->GetValue());

Here is the error I am getting:

Fatal error: Call to a member function on a non-object in =
E:\TestWEB\openre\Main_events.php on line 19

I have searched the tips and forums for a solution but haven't been =
able to find one. Can anyone point me in the right direction? It seems =
to me that I should be able to do this at design time instead of runtime =
or maybe I am not understanding how the imagelink control is supposed to =
work. Any help is greatly appreciated. Thanks in advance.


------=_NextPart_000_00D4_01C348C1.DE9858C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2722.900" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>The problem was in the ODBC connection =
pointing to=20
an older version of the database without the fullpath in the file. Boy =
do I feel=20
stupid!! :-)</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><<A=20
=
href=3D"mailto:dontspamme_dsafar@hotmail.com">dontspamme_dsafar@hotmail.c=
om</A>>=20
wrote in message <A=20
=
href=3D"news:bemt3o$j19$1@news.codecharge.com">news:bemt3o$j19$1@news.cod=
echarge.com</A>...</DIV>
<DIV><FONT face=3DArial>PHP & MySQL</FONT></DIV>
<DIV><FONT face=3DArial>I am having a problem getting an image to =
display on an=20
imagelink control. The control is inside a grid. The sql for the grid =
is as=20
follows:</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>SELECT id AS r_id, image_url AS r1_image_url =
<BR>FROM=20
re_inventory r INNER JOIN re_invimages r1 ON r.id =3D =
r1.img_id<BR>WHERE (=20
featured=3D'Y' )</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>The name of the Form is Featured. This =
returns  the=20
ID and image file name( i.e. 1, frontview.jpg). For whatever reason =
the path=20
is stripped since the field image_url actually contains=20
"images/inventory/frontview.jpg".  The href is built correctly. =
The name=20
of the imagelink on the form is primaryimg. The "src" under the format =
tab is=20
{primaryimg_Src} and this also appears in the html as:</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial><td class=3D"CobaltDataTD"><a=20
class=3D"CobaltDataLink" href=3D"{primaryimg}"><img =
class=3D"CobaltInput"=20
src=3D"{primaryimg_Src}" =
border=3D"0"></a>&nbsp;</td>=20
</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>. In the before show event, I am trying to =
point this to=20
the correct location of the image with this code: </FONT></DIV>
<DIV> </DIV>
<DIV> <FONT=20
=
face=3DArial>$Featured->primaryimg_Src->SetValue("images/inventory/=
".$Featured->primaryimg->GetValue());</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>Here is the error I am getting:</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><STRONG>Fatal error</STRONG>: Call to a member function on a =
non-object=20
in <B>E:\TestWEB\openre\Main_events.php</B> on line =
<B>19</B><BR></DIV>
<DIV><FONT face=3DArial>I have searched the tips  and forums for =
a solution=20
but haven't been able to find one. Can anyone point me in the right =
direction?=20
It seems to me that I should be able to do this at design time instead =
of=20
runtime or maybe I am not understanding how the imagelink control is =
supposed=20
to work. Any help is greatly appreciated. Thanks in =
advance.</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_00D4_01C348C1.DE9858C0--

   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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