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

 How to disallow focus on listbox

Print topic Send  topic

Author Message
teresawhlr

Posts: 10
Posted: 04/12/2005, 3:07 PM

I have an editable grid with 2 columns (listbox and checkbox) and I only want the user to be able to change the checkbox. If possible, I do not want the listbox to even get focus.

Any suggestions would be greatly appreciated...
View profile  Send private message
smalloy

Posts: 107
Posted: 04/12/2005, 3:29 PM

Hmmm, well there's two ways to accomplish this - they are Setting the design time property DISABLED to true. You do this by clicking on the lsitbox, go to Properties and on the Format tab check the disabled property.

If you need to do this during run time I believe your gonna be stuck with JavaScript. which would be a java function like:

<script language="JavaScript">
function DisbleList(){

If (something = something){
document.getElementById("listboxesname").disabled=true;
}
}
</script>

make sure that in the listboxes properties - format you put the listboxesname in the id field. Also you'll need to call the function with something like:

javascript:DisbleList() in one of the events, like onclick.

Please let me know if you need to use the java solution and you need more help - if your new to javascript there are some pitfalls to watchout for.

Steve


_________________
Anything can be done, just give me time and money.
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.

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.