Link to home
Start Free TrialLog in
Avatar of terminateall
terminateall

asked on

How to Add a Jscript to open a new form when user selects option set "yes"

Hi All,

I am currently using MS CRM 2011 Online. I have a form called formA on which i have option set yes or no. I want to add Jscript or any other script which will open a another form called formB when user selects option "yes".

Currently this is my test ORG and i will implement the same in my ON-premise ORG.

Thanks in Advance.
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Just hide the form, unless the user selects yes.
On the change event of the select,  if the 'yes' option is selected show the form or else hide the form

document.getElementById("formId1").style.display= "none"; //to hide it

document.getElementById("formId1").style.display= "block"; //to show it
Avatar of terminateall
terminateall

ASKER

I dont want to hide the existing form but, want to have a new form of different entity open when user selects yes.
so you want to create another form when the option yes is selected?
Thats right...
Let me explain again....

For Example i have an entity named as Account and there are two option set on the account form "yes" and "no"
NOw if i select yes on the account form, it should open up another form of another entity (let say contact)

Thanks,
Nadeem.
You can leave a place holder (an empty div) where you will fill the form html at the selection of 'Yes' option
<div id="formContainer"></div>

document.getElementById("formContainer").innerHTML = "<form></form>";
Thank you i'll check it out and let you know.
ASKER CERTIFIED SOLUTION
Avatar of terminateall
terminateall

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I found the solution on my own.