0

I have 2 pages. On page 1 i have two values, one is string and one is datetime. I want to pass that value to page 2 but i have problem, the string is passed but datetime is not passed. This is my code

time = jQuery('#timepicker_7').val();    
    var url = "test.aspx?name=" + encodeURIComponent(lObjSeat[0].Name) + "&technology=" + encodeURIComponent(time);
    window.location.href = url;

this is what's on page 2

<script type="text/javascript">
var queryString = new Array();
$(function () {
    if (queryString.length == 0) {
        if (window.location.search.split('?').length > 1) {
            var params = window.location.search.split('?')[1].split('&');
            for (var i = 0; i < params.length; i++) {
                var key = params[i].split('=')[0];
                var value = decodeURIComponent(params[i].split('=')[1]);
                queryString[key] = value;
            }
        }
    }
    if (queryString["name"] != null) {
        var data = "<u>Values from QueryString</u><br /><br />";
        data += "<b>Name:</b> " + queryString["name"] + " <b>Technology:</b> " + queryString["technology"];
        $("#lblData").html(data);
    }
});

"name" is done. but "time" is not show. whats the problem ?

Dat Nguyen
  • 1,881
  • 17
  • 36
azalikaEriya
  • 195
  • 1
  • 4
  • 17

0 Answers0