ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Set Focus to Bottom of IFRAME element using JavaScript<p>I will get back soon.</p>https://www.aspforums.net:443/Threads/771704/Set-Focus-to-Bottom-of-IFRAME-element-using-JavaScript/https://www.aspforums.net:443/Threads/771704/Set-Focus-to-Bottom-of-IFRAME-element-using-JavaScript/Thu, 13 Dec 2018 21:52:35 GMTSet Focus to Bottom of IFRAME element using JavaScript<p>Hey <a class="username" rel="sasi">sasi</a>,</p> <p>Please refer below sample.</p> <p><span style="text-decoration: underline;"><strong>HTML</strong></span></p> <p><strong>CS.aspx</strong></p> <pre class="brush: html">&lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&gt; &lt;head runat=&#34;server&#34;&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form id=&#34;form1&#34; runat=&#34;server&#34;&gt; &lt;div&gt; &lt;iframe id=&#34;iFrame&#34; runat=&#34;server&#34; src=&#34;Default.aspx&#34;&gt;&lt;/iframe&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt;</pre> <p><strong>Default.aspx</strong></p> <pre class="brush: html">&lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&gt; &lt;head runat=&#34;server&#34;&gt; &lt;title&gt;&lt;/title&gt; &lt;script type=&#34;text/javascript&#34;&gt; window.onload = function () { window.scrollTo(0, document.body.scrollHeight); document.getElementById(&#34;TextBox1&#34;).focus(); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id=&#34;form1&#34; runat=&#34;server&#34;&gt; &lt;div&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; Welcome To ASPSnippets.com &lt;asp:TextBox ID=&#34;TextBox1&#34; runat=&#34;server&#34; /&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt;</pre> <p><span style="text-decoration: underline;"><strong>Screenshot</strong></span></p> <p><img src="https://imgur.com/75c83yR.jpg" alt="" width="328" height="272" /></p>https://www.aspforums.net:443/Threads/771704/Set-Focus-to-Bottom-of-IFRAME-element-using-JavaScript/https://www.aspforums.net:443/Threads/771704/Set-Focus-to-Bottom-of-IFRAME-element-using-JavaScript/Fri, 14 Dec 2018 02:56:37 GMTSet Focus to Bottom of IFRAME element using JavaScript<p>&nbsp;</p> <pre class="brush: html">&lt;html&gt; &lt;head runat=&#34;server&#34;&gt; &lt;/head&gt; &lt;iframe&gt; &lt;body&gt; assgd fdsf dsf fds f dsfd svcvcvf vcvcvf dvfv vvvs fdfdsfdsf &lt;/body &lt;/iframe&gt; &lt;/html&gt;</pre> <p>My code looks like above. I need to focus the cursor&nbsp;at the end of the line in iframe body when the page loads.&nbsp;help appreciated.</p>https://www.aspforums.net:443/Threads/771704/Set-Focus-to-Bottom-of-IFRAME-element-using-JavaScript/https://www.aspforums.net:443/Threads/771704/Set-Focus-to-Bottom-of-IFRAME-element-using-JavaScript/Fri, 14 Dec 2018 05:07:07 GMTSet Focus to Bottom of IFRAME element using JavaScript<p>You can't display cursor on page. For displaying cursor you need to use TextBox.</p>https://www.aspforums.net:443/Threads/771704/Set-Focus-to-Bottom-of-IFRAME-element-using-JavaScript/https://www.aspforums.net:443/Threads/771704/Set-Focus-to-Bottom-of-IFRAME-element-using-JavaScript/Fri, 14 Dec 2018 05:29:29 GMT