CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Footer Event Issue

Print topic Send  topic

Author Message
kwallenbeck

Posts: 3
Posted: 02/03/2004, 6:18 AM

Please take a look at the following. I think what is happening is that this is the footer file and because of that the MyCode object is created in the common include which the footer include does not have access to yet while trying to run this code. If this is correct. What can we do to get around it? Can we create the object ourselves? If so where is it and what is it called?

Thanks:)

footer_events.asp

<%
Function Footer_BeforeShow() 'Footer_BeforeShow @1-A7B54936

'Custom Code @2-73254650
' -------------------------
Dim CustomFooterBlock
Set CustomFooterBlock = Tpl.Block("MyCode")
If CInt(Session("IsMaster")) = CInt(1) AND Session("GroupID") <> "" Then
CustomFooterBlock.Variable("IsMaster") = "test"
CustomFooterBlock.Parse ccsParseOverwrite
Else
'CustomFooterBlock.Variable("IsMaster") = "test"
'CustomFooterBlock.Parse ccsParseOverwrite
End If

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

End Function 'Close Footer_BeforeShow @1-54C34B28


%>

Error on Pages


Microsoft VBScript runtime error '800a01a8'

Object required: 'CustomFooterBlock'

/admin/Footer_events.asp, line 9
_________________
Kevin Wallenbeck
fltgroup.com / hesonline.com
View profile  Send private message
DonB
Posted: 02/03/2004, 6:31 AM

Not clear what you are trying to do or what your problem is - do you get an
error? What error?

It appears you want some text to appear in the footer given certain
conditions (session variables having specific values). Is there always a
footer needed or should it only appear (or change what data is displayed)
under these conditions?

You can show/hide the entire footer Include in the page Before Show event,
based on the value of session variables. No direct template var
manipulation needed. Likewise, if there is a Label control in the footer,
you can assign a value to it without getting into the template vars.

--
DonB

http://www.gotodon.com/ccbth


"kwallenbeck" <kwallenbeck@forum.codecharge> wrote in message
news:6401fadbd1cdd4@news.codecharge.com...
> Please take a look at the following. I think what is happening is that
this is the footer file and because of that the MyCode object is created in
the common include which the footer include does not have access to yet
while trying to run this code. If this is correct. What can we do to get
around it? Can we create the object ourselves? If so where is it and what is
it called?
>
> Thanks:)
>
> footer_events.asp
>
> <%
> Function Footer_BeforeShow() 'Footer_BeforeShow @1-A7B54936
>
> 'Custom Code @2-73254650
> ' -------------------------
> Dim CustomFooterBlock
> Set CustomFooterBlock = Tpl.Block("MyCode")
> If CInt(Session("IsMaster")) = CInt(1) AND Session("GroupID") <> "" Then
> CustomFooterBlock.Variable("IsMaster") = "test"
> CustomFooterBlock.Parse ccsParseOverwrite
> Else
> 'CustomFooterBlock.Variable("IsMaster") = "test"
> 'CustomFooterBlock.Parse ccsParseOverwrite
> End If
>
> ' -------------------------
> 'End Custom Code
>
> End Function 'Close Footer_BeforeShow @1-54C34B28
>
>
> %>
>
> Error on Pages
>
>
> Microsoft VBScript runtime error '800a01a8'
>
> Object required: 'CustomFooterBlock'
>
> /admin/Footer_events.asp, line 9
> _________________
> Kevin Wallenbeck
> fltgroup.com / hesonline.com
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

peterr


Posts: 5971
Posted: 02/03/2004, 2:00 PM

I'm also not sure what you're asking but when working with components within an includable page, you may need to use Page name when referring to objects. For example:
footer.Tpl.Block("MyCode")

I haven't test this specific case because I don't understand what you are trying to accomplish.
If you are trying to display something on the page then place a label on the page, then use code like:
footer.Label1.Value = "abc"

or if this is not an includable page then:
Label1.Value = "abc"

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
kwallenbeck

Posts: 3
Posted: 02/03/2004, 6:35 PM

Since I have confused everyone:) Here is what I am trying to do...

I need to add a link to my footer based on a session value. The link html would go where 'test' is. The footer is always there!

What is the best way to do this?

Thanks in advance,
_________________
Kevin Wallenbeck
fltgroup.com / hesonline.com
View profile  Send private message
DonB
Posted: 02/03/2004, 6:50 PM

OK, then I would create the link as if it was always there - do nothing
special, just create the link. Then, in the Before Show event for that
link, I'd set the visible property to false if the required conditions are
not met. Presumably you are trying to hide a link from unauthorized eyes.

--
DonB

http://www.gotodon.com/ccbth


"kwallenbeck" <kwallenbeck@forum.codecharge> wrote in message
news:640205a8e810b1@news.codecharge.com...
> Since I have confused everyone:) Here is what I am trying to do...
>
> I need to add a link to my footer based on a session value. The link html
would go where 'test' is. The footer is always there!
>
> What is the best way to do this?
>
> Thanks in advance,
> _________________
> Kevin Wallenbeck
> fltgroup.com / hesonline.com
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

peterr


Posts: 5971
Posted: 02/03/2004, 8:26 PM

Kevin,

BTW, hiding Links was also discussed here (including additional comments by Don):
http://forums.codecharge.com/posts.php?post_id=27353

Just keep in mind that in includable pages you may need to include the page name when refertring to components:
footer.Link1.Value = ""
or
footer. Link1.Visible = false

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Nicole

Posts: 586
Posted: 02/05/2004, 4:43 AM

Darren,
The code for the includable page would be
Dim MyBlock
Set MyBlock=Footer.HTMLTemplate.Block("MyBlock")
MyBlock.Variable("IsMaster")="bbb"
MyBlock.Show
Or
Footer.HTMLTemplate.SetVar "@IsMaster","aaaaaa"
Footer.HTMLTemplate.Parse "MyBlock", False

_________________
Regards,
Nicole
View profile  Send private message

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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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