How do I use the slideDown with a control that exists on the masterpage from javascript on a contenpagehttp://forums.asp.net/t/1790119.aspx/1?How+do+I+use+the+slideDown+with+a+control+that+exists+on+the+masterpage+from+javascript+on+a+contenpageMon, 09 Apr 2012 04:59:32 -040017901194920244http://forums.asp.net/p/1790119/4920244.aspx/1?How+do+I+use+the+slideDown+with+a+control+that+exists+on+the+masterpage+from+javascript+on+a+contenpageHow do I use the slideDown with a control that exists on the masterpage from javascript on a contenpage <p>I have tried the following but it doesn't work. I already have access to the control using javascript, but am trying to use jquery to do it instead.</p> <p>&nbsp;</p> <p>Something like this</p> <pre class="prettyprint">$('div[id*=master.divAddAnotherProduct]').slideDown(&quot;slow&quot;);</pre> <p><br> s.</p> 2012-04-06T22:54:30-04:004920249http://forums.asp.net/p/1790119/4920249.aspx/1?Re+How+do+I+use+the+slideDown+with+a+control+that+exists+on+the+masterpage+from+javascript+on+a+contenpageRe: How do I use the slideDown with a control that exists on the masterpage from javascript on a contenpage <p></p> <blockquote><span class="icon-blockquote"></span> <h4>JAYHAWKER</h4> <p></p> <p><span class="pln">&#36;</span><span class="pun">(</span><span class="str">'div[id*=master.divAddAnotherProduct]'</span><span class="pun">).</span><span class="pln">slideDown</span><span class="pun">(</span><span class="str">&quot;slow&quot;</span><span class="pun">);</span></p> <p><br> </p> </blockquote> <p></p> <p>That selector looks odd... is &quot;<span class="str">divAddAnotherProduct</span>&quot; part of the id or is that a class on the &lt;div&gt;?</p> 2012-04-06T22:59:43-04:004920252http://forums.asp.net/p/1790119/4920252.aspx/1?Re+How+do+I+use+the+slideDown+with+a+control+that+exists+on+the+masterpage+from+javascript+on+a+contenpageRe: How do I use the slideDown with a control that exists on the masterpage from javascript on a contenpage <p>It is just the name of my div.&nbsp; The syntax works fine if the div is in my content page (by eliminating the Master.), but this div is in a master page. I have it declared in codebehind of the master page as a public control and can access it with javascript using the traditional document.getElemtentBy ID. but want to access it with jquery.</p> <p>&nbsp;Thanks!</p> 2012-04-06T23:04:04-04:004920256http://forums.asp.net/p/1790119/4920256.aspx/1?Re+How+do+I+use+the+slideDown+with+a+control+that+exists+on+the+masterpage+from+javascript+on+a+contenpageRe: How do I use the slideDown with a control that exists on the masterpage from javascript on a contenpage <p>Put single quotes around the &quot;<span class="str">master.divAddAnotherProduct&quot; part.<br> </span></p> 2012-04-06T23:09:46-04:004920258http://forums.asp.net/p/1790119/4920258.aspx/1?Re+How+do+I+use+the+slideDown+with+a+control+that+exists+on+the+masterpage+from+javascript+on+a+contenpageRe: How do I use the slideDown with a control that exists on the masterpage from javascript on a contenpage <p>It won't let me do it&nbsp; syntax error says &quot;expecting , or )</p> 2012-04-06T23:12:58-04:004920282http://forums.asp.net/p/1790119/4920282.aspx/1?Re+How+do+I+use+the+slideDown+with+a+control+that+exists+on+the+masterpage+from+javascript+on+a+contenpageRe: How do I use the slideDown with a control that exists on the masterpage from javascript on a contenpage <p>Right, you need this:</p> <p><span class="pln">&#36;</span><span class="pun">(&quot;</span><span class="str">div[id*='master.divAddAnotherProduct']&quot;</span><span class="pun">).</span><span class="pln">slideDown</span><span class="pun">(</span><span class="str">&quot;slow&quot;</span><span class="pun">);</span></p> 2012-04-07T00:36:08-04:004920495http://forums.asp.net/p/1790119/4920495.aspx/1?Re+How+do+I+use+the+slideDown+with+a+control+that+exists+on+the+masterpage+from+javascript+on+a+contenpageRe: How do I use the slideDown with a control that exists on the masterpage from javascript on a contenpage <p>Hi,</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>JAYHAWKER</h4> <span class="pln">&#36;</span><span class="pun">(</span><span class="str">'div[id*=master.divAddAnotherProduct]'</span><span class="pun">).</span><span class="pln">slideDown</span><span class="pun">(</span><span class="str">&quot;slow&quot;</span><span class="pun">);</span></blockquote> <p></p> <p>If <span class="str">master.divAddAnotherProduct</span> is the name of your div then try-</p> <pre class="prettyprint">$('div[name*=master.divAddAnotherProduct]').slideDown(&quot;slow&quot;);</pre> 2012-04-07T07:19:05-04:004920764http://forums.asp.net/p/1790119/4920764.aspx/1?Re+How+do+I+use+the+slideDown+with+a+control+that+exists+on+the+masterpage+from+javascript+on+a+contenpageRe: How do I use the slideDown with a control that exists on the masterpage from javascript on a contenpage <p>when a masterpage is used and the control is in the master page then its Client ID Doesn't change but when the Control is in the content Page then its control is changed. so first find out the length of the jQuery object</p> <p>&#36;('control ID according to you').length</p> <p>it should result you as 1. if its equal to 0, that means the id is not the correct one.</p> <p>if you are using the .net 4 then you can set the ClientIDMode to static and then use the same id to identify the control.</p> <p></p> 2012-04-07T11:16:10-04:004920881http://forums.asp.net/p/1790119/4920881.aspx/1?Re+How+do+I+use+the+slideDown+with+a+control+that+exists+on+the+masterpage+from+javascript+on+a+contenpageRe: How do I use the slideDown with a control that exists on the masterpage from javascript on a contenpage <p>I could not get any of the above to work. The following will show it but it doesn't slide down.</p> <pre class="prettyprint">var pnlRef = document.getElementById('&lt;%= Master.pnl %&gt;'); pnlRef.style.display = &quot;inline&quot;;</pre> <p>I can't get anything else to work.</p> <p>Thanks for the tries!</p> 2012-04-07T13:42:02-04:004922104http://forums.asp.net/p/1790119/4922104.aspx/1?Re+How+do+I+use+the+slideDown+with+a+control+that+exists+on+the+masterpage+from+javascript+on+a+contenpageRe: How do I use the slideDown with a control that exists on the masterpage from javascript on a contenpage <p>Hi JAYHAWKER,</p> <p>I would like to suggest you try &#36;('#&lt;%= Master.pnl %&gt;').slideDown(&quot;slow&quot;);</p> <p>at first, plesae check if &#36;('#&lt;%= Master.pnl %&gt;') can get the correct div object, and then apply slideDown effect.</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>JAYHAWKER</h4> <p></p> <p>The following will show it but it doesn't slide down. &nbsp; var pnlRef = document.getElementById('&lt;%= Master.pnl %&gt;');&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pnlRef.style.display = &quot;inline&quot;; </p> </blockquote> <p></p> <p>in above code pnlRef can show div, but can not slide down, please try to remove pnlRef.style.display = &quot;inline&quot;; and add code to explicitly set the &quot;top&quot; and &quot;left&quot; of div, you can refer article below</p> <p><a href="http://forum.jquery.com/topic/jquery-effects-like-slidedown-that-leave-display-set-to-inline">http://forum.jquery.com/topic/jquery-effects-like-slidedown-that-leave-display-set-to-inline</a></p> <p>Hope this helps, thanks.</p> 2012-04-09T03:15:40-04:004922189http://forums.asp.net/p/1790119/4922189.aspx/1?Re+How+do+I+use+the+slideDown+with+a+control+that+exists+on+the+masterpage+from+javascript+on+a+contenpageRe: How do I use the slideDown with a control that exists on the masterpage from javascript on a contenpage <p>Hi,</p> <p>Why not simply add a CSS class to the panel and use the CSS class selector and add your necessary jQuery on it.</p> 2012-04-09T04:59:32-04:00