CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> IDE/GUI

 Disable Menu Links Until Listbox Is Selected.

Print topic Send  topic

Author Message
Suntower

Posts: 225
Posted: 02/09/2005, 12:03 PM

Hello,

On my Main Menu page, I have a list box where the user should select a Cost Center from a drop list before they are allowed to navigate. Is it possible to disable the menu links until a value is selected in the listbox? If so, can someone give me a hint?

TIA,

---JC
_________________
---On a campaign for more examples and better docs!
View profile  Send private message
mrachow


Posts: 509
Posted: 02/10/2005, 12:32 AM

An idea (only).
For every link I would place a Label beside the Link.
First I would show the label. After a selection was done set the Label.Visible = false and the property visible of the Link to True.
_________________
Best regards,
Michael
View profile  Send private message
Nicole

Posts: 586
Posted: 02/10/2005, 2:43 AM

Suntower,
You can disable/enable link on a client side. I managed to do it with JavaScript code. I also modified default HTML a bit.
Well, I used CCS Links control and I added a name attribute and onClick event for it:
  
<a href="{Link1_Src}" name="Link1" onClick = "javascript: return Link_OnClick();">{Link1}</a>  

Name is necessary to identify a Link from JS code and onClick is used to prevent user from following disabled link:
  
function Link_OnClick()  
{  
if (document.links("Link1").disabled == true)  
return false;  
else  
return true;  
}  

To disable link when page loads I created client side onLoad event for a page:
  
document.links("Link1").disabled = true;  

To enable link when user selects a value from a listbox I used client side onChnage event:
  
if (document.links("Link1").disabled == true)  
document.links("Link1").disabled = false;  

Hope it helps ;-)

_________________
Regards,
Nicole
View profile  Send private message
dhana
Posted: 02/23/2005, 9:04 AM

This is my code in php

$vurl = "paging.php?vcurrent=" . $vcurrent;

echo "<a href=\"$vurl\">Next</a>\n";

How can i disable after selected the LINK NEXT.

rgds,
Dhana:-<

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.