CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 [Resolved] Label Value Doesn't Work - Weird!

Print topic Send  topic

Author Message
maxhugen

Posts: 272
Posted: 01/11/2009, 5:29 PM

I've added a Label "RID" within a link so I can set a URL parameter:
<a href="/Review_popup.php" onclick="return PopupReview(this,{RID},0)">Add your review</a>

Using Firebug + FirePHP, I have verified that the Label control is being set correctly in the control's BeforeShow event:

$eid = CCGetFromGet("EID","");  
    fb("eid: ".$eid);  
$Component->SetValue($eid);  
    fb("Component: ".$Component->GetValue());  // returns the expected value  

However, it does not appear in the webpage !!!

Yet, the identical link and code works fine in another webpage. (I copied and pasted it to the non-working page).

I'm pulling my hair out over this... has anyone any suggestions?

MTIA
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
View profile  Send private message
ckroon

Posts: 869
Posted: 01/11/2009, 7:52 PM

The first code refers to RID the second code refers to EID...?
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
maxhugen

Posts: 272
Posted: 01/12/2009, 1:32 PM

Yes, "RID" is just the name of the Label, whereas "EID" is the URL param...
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
View profile  Send private message
damian

Posts: 838
Posted: 01/12/2009, 6:42 PM

it sounds like your label is displaying before the event is firing...

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
maxhugen

Posts: 272
Posted: 01/12/2009, 7:15 PM

I have the code in the Label's BeforeShow event....
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
View profile  Send private message
jjrjr1


Posts: 942
Posted: 01/13/2009, 9:01 AM

Try getting rid of the label,

In the onclick event parameter for the control in the properties dialog box place your onclick javascript.

return PopupReview(this,{RID},0);

Then in the page before show event

global $Tpl

$Tpl->setvar("RID",CCGetParam("EID",""));


_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
maxhugen

Posts: 272
Posted: 01/13/2009, 2:35 PM

Hi John

Good news, and bad! The good news is that your suggestion works, thank you!

The bad news is that I really don't understand why?

I use template variables in a number of places, and can distinguish them from "Labels" by clicking on them - CCS doesn't display properties for it etc.

I've also used Labels outside of Forms (ie, not in a CCS block), and used BeforeShow to set their values. Haven't struck a problem before.

In a sense, I've been mixing template variables and Labels... but now I'm not sure which to use where, and why.

From your experience, can you offer any thoughts on this?

Many thanks.
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
View profile  Send private message
jjrjr1


Posts: 942
Posted: 01/18/2009, 6:45 AM

Hi

I think the problem is along the lines of what damian suggested. In fact, it was his post that caused me to suggest this quick fix for you. And without looking at the code and it possibly being what he suggested, I thought this method would be the quickest en easiest to implement.

CCS sometimes places the firing order of events in such ways that they do not occur in the order you expect. You might look at the main page code to see when this label if processed at both the page level and component level.

However, you do not want to modify the CCS generated code to re-order the events. It will break CCS's ability to maintain the form.

In the past I have deleted controls and replaced them in order to get the squence i want.

In this case, I just gave you a quick fix that is not dependant on those events firing order as it seemed you just wanted to display the data and this was the easiest way to describve a fix for you.

Does that help?


_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
maxhugen

Posts: 272
Posted: 01/18/2009, 3:11 PM

I agree that the firing of events is not always intuitive; I have often wished for more info from YesSoftware as to the sequence(s) of these.

I'm just grateful for your 'quick fix' - one more trick to remember. ;-)

Cheers
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
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.

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.