Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to place javascript in nested Master Pages
    text
    copied!<p>I have a situation where on a page that has a nested master page needs to have a peice of java script. And i'm really unsure of where/how to add the javascript.</p> <p>My layout is as follows: Master.masterpage(top master page); Client.MasterPage(which inheirts Master.masterpage) assort.aspx(which inheirts client.masterpage);</p> <p>In assort.aspx I need to have the following javascript available so on a onclick it will pop open a new window.</p> <pre><code>function ShowPopUpDialog(url) { window.open(url, 'MyPopUpWindow', 'height = 300px, width = 300px', true); } </code></pre> <p>Where/how do I place the javascript. I only want this active on assort.aspx, so I should only place it on Client.Masterpage correct? If not where do I place it on assort.aspx? There is no head section.</p> <p>Here is my Client.MasterPage:</p> <pre><code>&lt;asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server"&gt; &lt;link href="css/valet.css" rel="stylesheet" type="text/css" /&gt; &lt;/asp:Content&gt; &lt;asp:Content ID="Content2" ContentPlaceHolderID="ContactPlaceHolder_Header" runat="Server"&gt; &lt;/asp:Content&gt; &lt;asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder_Navigation" runat="Server"&gt; &lt;/asp:Content&gt; &lt;asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder_Content" runat="Server"&gt; &lt;div class="InfoContainer"&gt; &lt;asp:ContentPlaceHolder ID="ContentInfo" runat="server"&gt; &lt;/asp:ContentPlaceHolder&gt; &lt;/div&gt; &lt;div class="CRadGrid"&gt; &lt;asp:ContentPlaceHolder ID="RadGridPlaceHolder" runat="server"&gt; &lt;/asp:ContentPlaceHolder&gt; &lt;/div&gt; &lt;div class="MultiPage"&gt; &lt;asp:ContentPlaceHolder ID="MultiPageContainer" runat="server"&gt; &lt;/asp:ContentPlaceHolder&gt; &lt;/div&gt; &lt;/asp:Content&gt; </code></pre> <p>My assort.aspx:</p> <pre><code>&lt;asp:Content ID="Content1" ContentPlaceHolderID="ContentInfo" Runat="Server"&gt; &lt;/asp:Content&gt; &lt;asp:Content ID="Content2" ContentPlaceHolderID="RadGridPlaceHolder" Runat="Server"&gt; &lt;/asp:Content&gt; &lt;asp:Content ID="Content3" ContentPlaceHolderID="MultiPageContainer" Runat="Server"&gt; &lt;/asp:Content&gt; </code></pre>
 

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