Question

Asked on 2011-05-09 at 08:03:59ID: 27360740

Javascript Function IN or NOT IN

by: lrbrister500

Rating9.0Excellent

I have a JavaScript Function working with a Telerik RadGrid.

In the attached script, I would like to change the if (mymessage == "LT") so that it would ALSO have the following logic

and afsSourceDetail NOT IN ("var1", var2", var3")

else if (item.get_text() == "SplitTaxes") {
            vdataItemIndex = $find("<%=grdAvailableForSale.MasterTableView.ClientID%>").get_selectedItems()[0];
            var afsSource = vdataItemIndex.get_cell("afsSource").innerHTML;
            var afsSourceDetail = vdataItemIndex.get_cell(afsSourceDetail).innerHTML;
            var mymessage = afsSource.substring(0, 2)
            if (mymessage == "LT")
            args.set_cancel(!confirm("Are you sure you want to split taxes?" + afsSource));
            selectedRows.clear;
            }
            else {
                alert("Tax Split on Lottery Deals Only!");
                selectedRows.clear;
            }
                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:

Select allOpen in new window

Related Solutions

Solution

Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution

View This Solution - Start Your 30 Day Free Trial
Zone
general
Tags
Participating Experts
2
Solution Grade
A

Replies

 by: leakim971

Posted on 2011-05-09 at 08:08:27ID: 36812491

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: leakim971

Posted on 2011-05-09 at 08:10:20ID: 36812492

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: lrbrister

Posted on 2011-05-09 at 08:23:37ID: 36812493

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: CodeCruiser

Posted on 2011-05-09 at 08:50:37ID: 36812494

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: lrbrister

Posted on 2011-05-09 at 09:17:50ID: 36812495

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: leakim971

Posted on 2011-05-09 at 09:55:07ID: 36812496

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: leakim971

Posted on 2011-05-09 at 16:47:00ID: 36812497

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: lrbrister

Posted on 2011-05-10 at 04:18:38ID: 36812498

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: CodeCruiser

Posted on 2011-05-10 at 04:26:11ID: 36812499

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: lrbrister

Posted on 2011-05-10 at 04:57:54ID: 36812500

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: CodeCruiser

Posted on 2011-05-10 at 04:59:20ID: 36812501

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Log In

Forgot your password?Sign up

Top Experts

  1. mplungjan

    1,840

    0 points yesterday

    Profile

BrowseAre you an Expert?