2/21/2025 9:58:41 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss using & developing the legacy SalesLogix Web Client (For versions 7.0 and earlier). View the code of conduct for posting guidelines.
|
|
|
|
Enable/Disable SLX Picklist in web client
Posted: 13 Dec 06 10:37 AM
|
fiogf49gjkf0d Currently developing on V7 web client. I want to lock down the Contact name info so the user has to press a button to make it editable. There are three controls which need to be locked down to accomplish this - Prefix (picklist), Fname and Lname, both text fields.
I have locked down the text fields fine, but the code doesn't seem to work on the picklist. Here is what I am trying: I set the controls to disabled by default: <#PL field=conprefix list="Name Prefix" options=R id="conprefix" disabled> <--This doesn't disable the picklist <input type="text" id="confname" name="confname" value="<#F name=confname>" disabled /> <input type="text" id="conlname" name="conlname" value="<#F name=conlname>" disabled/> <input type="button" name="btnEnable" value="Edit" onClick="EnableEdit();">
The button calls this JS function:
function EnableEdit() { document.mainform.conprefix.disabled=false; document.mainform.confname.disabled=false; document.mainform.conlname.disabled=false; }
So the code works fine for the text fields, but not the picklist. Am I going about this correctly? Can I enable and disable the picklist with JS? Thanks |
|
|
|
Re: Enable/Disable SLX Picklist in web client
Posted: 13 Dec 06 10:59 AM
|
fiogf49gjkf0d That should work - are you sure no other javascript is enabling it elsewhere? I havent used v7 yet but I would have thought this functionality is the same. If nothing else (any other javascript functions such as init()) is 'messing' with the picklist, add a function to the onload of the form:
function DisableEdit() { document.mainform.conprefix.disabled=true; document.mainform.confname.disabled=true; document.mainform.conlname.disabled=true; } If that fails there must be something else javascript wise that is changing its status.
|
|
|
| |
|
Re: Enable/Disable SLX Picklist in web client
Posted: 13 Dec 06 12:19 PM
|
fiogf49gjkf0d Steve,
It's supposed to work - the DLL is supposed to pass through any attributes to custom tags it doesn't recognize. The theory being that way you can pass through "onClick", "onMouseOver", etc. But I've verified it's not working in 6.2.3, either.
What I'd do is open coninfo.js (in the jscript folder) and in the function "init()" that gets called when the body is loaded, add this:
document.mainform.conprefix.disabled = true;
That will make it disabled by default. Then add:
document.mainform.conprefix.disabled = false;
with the rest of your "enabling" code.
Jeff
|
|
|
| |
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|