Note that there are some explanatory texts on larger screens.

plurals
  1. POissue with window.open in href attribute
    primarykey
    data
    text
    <p>I am facing one issue because of URL encoding in window.open function when used under href attribute of link.</p> <p>Basically I am trying to open a generic popup in my site using window.open function.This popup page accept target page url which will be rendered inside the frame present on popup.aspx </p> <p>But because of url encoding url parmater which I am passing getting truncated in popup.aspx.cs page.</p> <p>The same window.open works correctly when directly called from JavaScript function. But failing when embedded in Href attribute.</p> <p>Below is the Code<br> Note: input url paramter is a proper decoded url using standard decoding function. </p> <pre><code>&lt;a href="javascript:void window.open('Popup.aspx?url=%2FB2B%2FDEV%2FSHARE%2FGRID%2FXML_GRID_PAGE.ASP%3FGRIDTYPE%3D2%26SID%3D33172D0A-565A-43D7-8D50-5C223B6E8C24%26CAID%3D0%26ViewID%3DPATIENTPROFILE%26InstanceID%3D375660844%C3%BF14542276%C3%BF3%C3%BFSTANDARD','','scrollbars=yes,menubar=yes,resizable=yes,left=30,top=30,height=500,width=650')"&gt; link&lt;/a&gt; </code></pre> <p>My assumption is when window.open embedded inside the href then somehow its get decoded and then passed to target popup page.</p> <p>Sample url seen in browser.</p> <p><a href="https://poorcmcdevvm15.xyz.com//b2b/mainmasterpage/popup.aspx?url=/B2B/DEV/SHARE/GRID/XML_GRID_PAGE.ASP?GRIDTYPE=2&amp;SID=33172D0A-565A-43D7-8D50-5C223B6E8C24&amp;CAID=0&amp;ViewID=PATIENTPROFILE&amp;InstanceID=375660844%C3%83" rel="nofollow noreferrer">https://poorcmcdevvm15.xyz.com//b2b/mainmasterpage/popup.aspx?url=/B2B/DEV/SHARE/GRID/XML_GRID_PAGE.ASP?GRIDTYPE=2&amp;SID=33172D0A-565A-43D7-8D50-5C223B6E8C24&amp;CAID=0&amp;ViewID=PATIENTPROFILE&amp;InstanceID=375660844Ã</a>¿14542276ÿ3ÿSTANDARD</p> <p>when same window.open called through javascript below is the url observed in browser</p> <p>Popup.aspx?url=%2FB2B%2FDEV%2FSHARE%2FGRID%2FXML_GRID_PAGE.ASP%3FGRIDTYPE%3D2%26SID%3D33172D0A-565A-43D7-8D50-5C223B6E8C24%26CAID%3D0%26ViewID%3DPATIENTPROFILE%26InstanceID%3D375660844ÿ14542276ÿ3ÿSTANDARD</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload