<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Load website &#8211; Sibeesh Passion</title>
	<atom:link href="https://sibeeshpassion.com/tag/load-website/feed/" rel="self" type="application/rss+xml" />
	<link>https://sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Fri, 17 Jul 2015 12:26:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>Load website &#8211; Sibeesh Passion</title>
	<link>https://sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Load Website to iFrame Using JQuery</title>
		<link>https://sibeeshpassion.com/load-website-to-iframe-using-jquery/</link>
					<comments>https://sibeeshpassion.com/load-website-to-iframe-using-jquery/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Fri, 12 Jun 2015 05:28:47 +0000</pubDate>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[IFrame]]></category>
		<category><![CDATA[Load website]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=4811</guid>

					<description><![CDATA[Introduction Hi All, I hope you are fine. Today we will learn how we can simply load a website to an iFrame using JQuery. Some of you might have already tried this, this article is for the one who never tried the same. Background I have been working with an application in which we have a widget called URL widget, we are doing so many things in that widget. Here I am going to say how we can simply load a website to the iFrame by giving the URL of website to src property of iFrame. Using the code To [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>Hi All, I hope you are fine. Today we will learn how we can simply load a website to an iFrame using JQuery. Some of you might have already tried this, this article is for the one who never tried the same.</p>
<p><strong>Background</strong></p>
<p>I have been working with an application in which we have a widget called URL widget, we are doing so many things in that widget. Here I am going to say how we can simply load a website to the iFrame by giving the URL of website to src property of iFrame.</p>
<p><strong>Using the code</strong></p>
<p>To start with, as always we need to load the JQuery first.</p>
<p>[js]<br />
&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js&quot;&gt;&lt;/script&gt;<br />
[/js]</p>
<p>Next part is to create some UI elements</p>
<p>[html]<br />
&lt;body&gt;<br />
    &lt;p id=&quot;loadMe&quot;&gt;loadMe&lt;/p&gt;<br />
    &lt;b&gt;Load my website here.&lt;/b&gt;<br />
	   &lt;iframe id=&quot;load&quot; src=&quot;&quot; &gt;&lt;/iframe&gt;<br />
&lt;/body&gt;<br />
[/html]</p>
<p>Once this is done we can style those elements by giving some styles as follows.</p>
<p>[css]<br />
&lt;style&gt;<br />
        #load {<br />
            position: absolute;<br />
            background-color: blue;<br />
            color: #fff;<br />
            padding: 10px;<br />
            border: 1px solid #ccc;<br />
            border-radius: 5px;<br />
            width: 100%;<br />
			height:100%;<br />
		    display:none;<br />
        }<br />
		#loadMe {<br />
            background-color: blue;<br />
            color: #fff;<br />
            padding: 10px;<br />
            border: 1px solid #ccc;<br />
            border-radius: 5px;<br />
            width: 80px;<br />
			height:30px;<br />
			cursor:pointer;<br />
        }<br />
    &lt;/style&gt;<br />
[/css]</p>
<p>Now we will see the JQuery part.</p>
<p>[js]<br />
 &lt;script&gt;<br />
        $(document).ready(function () {<br />
            $(&#8216;#loadMe&#8217;).click(function (e) {<br />
			$(&#8216;#load&#8217;).show();<br />
			$(&quot;#load&quot;).attr(&quot;src&quot;, &quot;http://www.sibeeshpassion.com/&quot;);<br />
            });<br />
        });<br />
    &lt;/script&gt;<br />
[/js]</p>
<p>What we so is, we are firing a click event in document.ready function. And in the click event we are setting the src attribute of iFrame</p>
<p>[js]<br />
$(&quot;#load&quot;).attr(&quot;src&quot;, &quot;http://www.sibeeshpassion.com/&quot;);<br />
[/js]</p>
<p>The beauty of iFrame is whenever we set the src, it will load that website content to that. So shall we see the output now?</p>
<p><strong>Output</strong></p>
<p><img decoding="async" src="http://sibeeshpassion.com/content/images/iframe1.PNG" alt="" /></p>
<p><img decoding="async" src="http://sibeeshpassion.com/content/images/iframe2.PNG" alt="" /></p>
<p><strong>Complete Code</strong></p>
<p>[html]<br />
&lt;!DOCTYPE html&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
    &lt;title&gt;Load Website to iFrame &#8211; Sibeesh Passion&lt;/title&gt;<br />
    &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js&quot;&gt;&lt;/script&gt;<br />
    &lt;style&gt;<br />
        #load {<br />
            position: absolute;<br />
            background-color: blue;<br />
            color: #fff;<br />
            padding: 10px;<br />
            border: 1px solid #ccc;<br />
            border-radius: 5px;<br />
            width: 100%;<br />
			height:100%;<br />
		    display:none;<br />
        }<br />
		#loadMe {<br />
            background-color: blue;<br />
            color: #fff;<br />
            padding: 10px;<br />
            border: 1px solid #ccc;<br />
            border-radius: 5px;<br />
            width: 80px;<br />
			height:30px;<br />
			cursor:pointer;<br />
        }<br />
    &lt;/style&gt;<br />
    &lt;script&gt;<br />
        $(document).ready(function () {<br />
            $(&#8216;#loadMe&#8217;).click(function (e) {<br />
			$(&#8216;#load&#8217;).show();<br />
			$(&quot;#load&quot;).attr(&quot;src&quot;, &quot;http://www.sibeeshpassion.com/&quot;);<br />
            });<br />
        });<br />
    &lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
    &lt;p id=&quot;loadMe&quot;&gt;loadMe&lt;/p&gt;<br />
    &lt;b&gt;Load my website here.&lt;/b&gt;<br />
	   &lt;iframe id=&quot;load&quot; src=&quot;&quot; &gt;&lt;/iframe&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/html]<br />
<strong>Conclusion </strong></p>
<p>I hope you enjoyed reading and found this useful. Please share me your valuable feedback. For me it matters a lot.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sibeeshpassion.com/load-website-to-iframe-using-jquery/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
