Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Debug JQuery/JavaScript?

Is it possible to be on a live page and "debug" the script below?

<script>
    function SaveValidation() {
        var surveydata = "";
        $('.rblsurvey').each(function () {
            debugger;
            var checked_radio = $("[id*=" + $(this).context.id + "] input:checked");
            var value = checked_radio.val();
                    
            var question = $(this).context.className.replace("rblsurvey rblMultiList_", "");
            surveydata = surveydata + question + "," + value + "|";
            //alert(surveydata);         
            $("#hdnsurveyvalues").val(surveydata);
        });

        $(".chks").each(function (index) {
            debugger
            var questionid = $(this).attr("class").replace("chks chkquestions_", "");
            var answerid = "";

            $(this).find(":checked").each(function (index) {
                answerid = questionid + "," + $(this).val() + "|" + answerid;
            });
                alert(answerid)                                        
            $("#hdnsurveyvaluesChk").val(answerid);
        });

              
    }
</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jim Riddles
Jim Riddles
Flag of United States of America 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 Larry Brister

ASKER

Thanks