Home > Software design >  Not working in Chrome and Edge 'frames.filedownframe.location.href'
Not working in Chrome and Edge 'frames.filedownframe.location.href'

Time:03-05

exception is thrown for line frames.filedownframe.location.href in below piece of code which is in common.js and common.min.js file only in edge and Chrome, while its working fine in IE.

function fn_FileDownload(n) { var t = null; try { t = "/Common/AttachFileDownload.aspx?IDX="   n; frames.filedownframe.location.href = t  } catch (i) { fn_OpenErrorMessage(i.description) } } 

CodePudding user response:

I have replaced the following line of code:

frames.filedownframe.location.href = t

with this:

windows.location=t 

I was able to download the attachment file.

  • Related