- Jscript + bit Field + hidding tab
- Posted by Newbie on July 2nd, 2008
I have a tab Called HP
On onload of the Form I hide this Tab
I have a Bit Field as a Checkbox called HP
As soon as I check the box the HP tab shows (yipppy)
I can than Save and Close the Form
That's Works Perfect
However when a reopen the File the Check box is Checked but the Tab Don't
Show
Please Help What am I Missing
Here is my Script for the Onload
if (crmForm.all.mcs_hp.DataValue != "true")
{
crmForm.all.tab2Tab.style.visibility = "hidden";
crmForm.all.tab2Tab.style.position = "absolute";
}
crmForm.all.mcs_hp.onclick = function(){
crmForm.all.mcs_hp.FireOnChange();
}
Here is my Script for the Onchange
crmForm.all.mcs_hp.DataValue == "true"
{
crmForm.all.tab2Tab.style.visibility = "visible";
crmForm.all.tab2Tab.style.position = "relative";
}
Thank you
- Posted by Mike R on July 2nd, 2008
Try
OnLoad event
crmForm.all.tab2Tab.style.display = "none";
if (crmForm.all.mcs_hp.DataValue != "true")
{
crmForm.all.tab2Tab.style.display = "";
}
OR
OnChange:
if (crmForm.all.mcs_hp.DataValue == "true")
{
crmForm.all.tab2Tab.style.display = "";
}
else
{
crmForm.all.tab2Tab.style.display = "none";
}
OnLoad
mcs_hp_OnChange0();
"Newbie" <newbie@new.net> wrote in message
news:eN9PuZE3IHA.2424@TK2MSFTNGP04.phx.gbl...
- Posted by Snow White on July 3rd, 2008
Hi
Please try putting this script on the form on load event
crmForm.all.mcs_hp.FireOnChange();
this calls your on change event when the form is loaded and therefore all
the conditions are executed... Thanks to Michael Hohne who replied to my post
- a priceless piece of info... thanks again Michael.
Cheers
Snow White..
"Newbie" wrote:
- Posted by Newbie on July 3rd, 2008
No Luck with These Codes
I think it has to do with being a Bit Field set as a Check BOX
Because if it is set to be List .it works perfectly
Any Other Ideas why it would not work for the Check Box?
"Newbie" <newbie@new.net> wrote in message
news:eN9PuZE3IHA.2424@TK2MSFTNGP04.phx.gbl...
- Posted by Snow White on July 3rd, 2008
Refer my post called " Checkbox Jscript CRM 4.0"
it certainly is the bit field set as check box - I am looking for help too -
hopefully someone comes to rescue...
"Newbie" wrote: