Link to home
Start Free TrialLog in
Avatar of mschirad
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
ASKER CERTIFIED SOLUTION
Avatar of nishant joshi
nishant joshi
Flag of India image

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
Avatar of mschirad
mschirad

ASKER

yes!  

is there a way for your var to use "startswith" ?

thank you!
SOLUTION
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