Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Sending Html button value to querystring not working

$
0
0

I am not sure exactly how to do this but in the code the 'result' works fine. I've added couple of input text boxes and I want those values to be passed to query string upon button click but it's not working...

<input type="text" id="referenceno" name="referenceno" required="required" />
<input class="input_type_button" onclick="formSubmit()" type="button" value="Submit form" />
function formSubmit() {
    var results = ""
    var refNo = $(this).find('input[name="referenceno"]');//THIS DOESN'T WORK$("li.question").each(function (index) {
        results += (index == 0 ? '' : ',') + $(this).find('input[name="question' + index + '"]:checked').val();
    });

    var iUrl = '../summary.aspx?results=' + results + '&referenceno=' + refNo;$('#Form1').attr('action', iUrl);
    document.getElementById("Form1").submit();
}





Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>