开发者

Redirect to page with parameters in javascript

开发者 https://www.devze.com 2023-01-29 19:54 出处:网络
function AddNew() { var _IsInterview = \'<%: Session[\"IsInterview\"] != null ? Session[\"IsInterview\"] : \"\" %>\';
function AddNew() {
            var _IsInterview = '<%: Session["IsInterview"] != null ? Session["IsInterview"] : "" %>';
            if (_IsInterview .toLowerCase() == 'true') {
                parent.$.fn.colorbox({ href: '/Vehicles/SaveRepository/?t=' + Math.random(), height: _popupHeight, width: _popupWidth, overlayClose: false });
        开发者_开发技巧    } else {
                var id4 = $("#BusinessId").val();
                parent.$.fn.colorbox({ href: '/Vehicles/SaveRepository/?id=0&id2=Vehicles&id3=Index&/' + id4 + '&t=' + Math.random(), height: _popupHeight, width: _popupWidth, overlayClose: false });
            }
        }

id4 value is not passing


Assuming everything else is correct:

function AddNew() {
    var _IsInterview = '<%: Session["IsInterview"] != null ? Session["IsInterview"] : "" %>';
    if (_IsInterview .toLowerCase() == 'true') {
        parent.$.fn.colorbox({ href: '/Vehicles/SaveRepository/?t=' + Math.random(), height: _popupHeight, width: _popupWidth, overlayClose: false });
    } else {
        var id4 = $("#BusinessId").val();
        parent.$.fn.colorbox({ href: '/Vehicles/SaveRepository/?id=0&id2=Vehicles&id3=Index&id4=' + id4 + '&t=' + Math.random(), height: _popupHeight, width: _popupWidth, overlayClose: false });
    }
}

You had "/" instead of "id4=".

0

精彩评论

暂无评论...
验证码 换一张
取 消