mschirad
asked on
Javascript/ html code for web page
I have a web page and I want it to display different text based on a tokenS that are rendered into text on the webpage when loaded.
The tokens are C2B_NRPLANCODE and C2B_NRINSTDESC
here is what I'm looking for:
If C2B_NRPLANCODE startswith “XX” and C2B_NRINSTDESC = "Trumpet" then
“text”
Else if C2B_NRPLANCODE starts with “YY” and C2B_NRINSTDESC = "Trombone" then
“text”
Else
“text”
Can I do this? and can I get an examle of the code?
Thanks,
MS
The tokens are C2B_NRPLANCODE and C2B_NRINSTDESC
here is what I'm looking for:
If C2B_NRPLANCODE startswith “XX” and C2B_NRINSTDESC = "Trumpet" then
“text”
Else if C2B_NRPLANCODE starts with “YY” and C2B_NRINSTDESC = "Trombone" then
“text”
Else
“text”
Can I do this? and can I get an examle of the code?
Thanks,
MS
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
is there a way for your var to use "startswith" ?
thank you!