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 -> PHP

 HTML Compliant problem with <a> and <li>

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 06/25/2009, 7:34 AM

I have code that colors an event in a calendar depending on whether it is a critical event or not. All working beautifully until a client uses IE7...... no colors! So, after much playing around it appears that the <a> must be within the <li> and then it works? In other words, having the <a> tags within the <li> tags is correct HTML.

Now, my problem is that I cannot get this to work. Any help would be wonderful.

This is the line in the html:

<!-- BEGIN EventRow --><a href="{EventDescription_Src}" id="work_detailEventDescription">{EventDescription}</a> <!-- END EventRow -->

and this is code in the beforeshowrow event:

if ($Container->critical_path->GetValue() == "1") {
$Container->EventDescription->SetValue("<li class=\"critical_path_li\">".$Container->EventDescription->GetValue()."</li>");
}else{
$Container->EventDescription->SetValue("<li class=\"work_li\">".$Container->EventDescription->GetValue()."</li>");
}

Now, How on earth do I change the code so that the <a> comes between the <li>?
View profile  Send private message
damian

Posts: 838
Posted: 06/25/2009, 6:12 PM

try this way - create label -
{mystartlist} and place like this -
<!-- BEGIN EventRow -->{mystartlist}<a href="{EventDescription_Src}" id="work_detailEventDescription">{EventDescription}</a> </li><!-- END EventRow -->
and place your event on the before show event of label:
if ($Container->critical_path->GetValue() == "1") {  
$Component->SetValue("<li class=\"critical_path_li\">");   
}else{  
$Component->SetValue("<li class=\"work_li\">");   
}

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

Posts: 744
Posted: 06/26/2009, 4:25 AM

Hi Damian,

Thank you for the reply. It does not work as is. I get a "Fatal error: Call to a member function GetValue() on a non-object in C:\php webs\job_management\calendar_all_events.php on line 15" error on the first line in the code.

You have given me an idea though and I will play some more later today.

Thank you so much,

Trevor
View profile  Send private message
damian

Posts: 838
Posted: 06/27/2009, 6:37 AM

trevor your error suggests that the problem is in your section of the code where you are determining if it is a critical event or not....
we moved this from beforeshowrow to beforeshow on the label so look at that GetValue line or try moving the code back to beforeshowrow - you just wont be able to use $Component - you will need the full path...
_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
saseow

Posts: 744
Posted: 06/28/2009, 6:20 AM

Hi Damian,

Once again you have come through with flying colors. This works very well!

Thank you very much!

Trevor
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.