简体   繁体   English

开发人员中的URL在生产服务器上不起作用

[英]URL working in dev doesn't work on production server

I have a stored proc that has url in its result set and onclick opens a new page with that url its working fine on my box but not on production server. 我有一个存储的proc,其结果集中包含url,并且onclick打开一个新页面,该url在我的机器上正常工作,但不在生产服务器上。

Here is my aspx: 这是我的aspx:

 function NavigateOnClick(sender, eventArgs) {
     try {
         var row = eventArgs.get_item().get_row().get_index();
         var url = sender.get_rows().get_row(row).get_cell(0).get_text();

         window.open(url);
     }
     catch (e) {

     }
 }

The URL format is ../cellsiteEdit.aspx?cellsiteId=bhjhj . URL格式为../cellsiteEdit.aspx?cellsiteId=bhjhj It opens a new window with 它会打开一个新窗口

/CellSiteEdit.aspx?CellSiteId=08C05834 

but the URL should be 但网址应为

/LiveLease/CellSiteEdit.aspx?CellSiteId=08C05  

and I am getting file or directory not found error. 并且我得到文件或目录未找到错误。 It works fine on my box. 在我的盒子上工作正常。

尝试

window.open(Regex.Replace(url, "../", ""));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM