2010-12-11 21 views
0
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 }); 
      } 
     } 

valeur ID4 ne passe pasRedirect à la page avec les paramètres en javascript

Répondre

1

Si tout le reste est 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 }); 
    } 
} 

Vous avez eu "/" au lieu de "ID4 =".