<?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>javascript-demos &#8211; Extreme Web Designs</title>
	<atom:link href="https://theextremewebdesigns.com/blog/tag/javascript-demos-2/feed/" rel="self" type="application/rss+xml" />
	<link>https://theextremewebdesigns.com/blog</link>
	<description>Web Design and Web Development</description>
	<lastBuildDate>Sun, 20 Jan 2013 07:24:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>
<site xmlns="com-wordpress:feed-additions:1">156673191</site>	<item>
		<title>How To Check If Textbox Is Empty Using JavaScript</title>
		<link>https://theextremewebdesigns.com/blog/javascript-textbox-empty-how-to-check-if-textbox-is-empty-using-javascript/</link>
					<comments>https://theextremewebdesigns.com/blog/javascript-textbox-empty-how-to-check-if-textbox-is-empty-using-javascript/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 20 Jan 2013 07:24:26 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[javascript-demos]]></category>
		<category><![CDATA[javascript-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=2037</guid>

					<description><![CDATA[If you have worked with forms, then you would know how important it is to process the form input to make sure that all the required information is filled out properly. In this article, I am going to share a very easy way that you can use to check if Textbox is Empty using JavaScript. How to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you have worked with forms, then you would know how important it is to process the form input to make sure that all the required information is filled out properly. In this article, I am going to share a very easy way that you can use to <em><strong>check if Textbox is Empty using JavaScript</strong></em>.</p>
<p><span id="more-2037"></span></p>
<h2>How to use JavaScript to Check If Textbox Is Empty?</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=2037" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<p>For this example, I am assuming that we have a Textbox in a form and we need to check if this textbox is empty or not when the &#8220;Check&#8221; button is clicked.</p>
<h3>Example: Check if Textbox has contents or if it is empty using JavaScript</h3>
<pre class="lang:xhtml decode:true" title="Example ">&lt;script Language="JavaScript"&gt;
&lt;!--
function check_blank()
{
// If the value of the textbox is empty, then show an alert
if (my_form.state.value == "")
{
alert("Please fill in State.");

// Focus the textbox so that user can fill it
my_form.state.focus();

// return false to stop further processing
return false;
}

// If state is not null continue processing
return true;
}
--&gt;
&lt;/script&gt;

&lt;form name="my_form" id="my_form" action="#" onsubmit="return check_blank();"&gt;
&lt;label for="state"&gt;State&lt;/label&gt;
&lt;input type="text" name="state" id="state" &gt;
&lt;input type="submit" value="Check"&gt;
&lt;/form&gt;</pre>
<p>Once you run the above code and click the &#8220;Check&#8221; button, the page will show an alert. If you enter something in it and then click the button, the form will quietly submit the info.</p>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=2037" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<p><strong>Simple, isn&#8217;t it?</strong></p>
<p>Do you know of any other ways to use <strong><em>JavaScript to check if textbox is empty</em></strong>? Feel free to suggest by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/javascript-textbox-empty-how-to-check-if-textbox-is-empty-using-javascript/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2037</post-id>	</item>
		<item>
		<title>JavaScript Get Image Dimensions (Width &#038; Height) Examples</title>
		<link>https://theextremewebdesigns.com/blog/javascript-get-image-dimensions-get-image-width-height/</link>
					<comments>https://theextremewebdesigns.com/blog/javascript-get-image-dimensions-get-image-width-height/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 19 Jun 2012 17:12:14 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[javascript-demos]]></category>
		<category><![CDATA[javascript-get-image-dimensions]]></category>
		<category><![CDATA[javascript-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=928</guid>

					<description><![CDATA[Have you ever wanted to get image dimensions using JavaScript? In this article, I am going to share an easy way to use JavaScript to get image dimensions (width &#38; height). How to use JavaScript to Get Image Dimensions (Width &#38; Height) Following is the complete HTML + JavaScript source code that shows how to get [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Have you ever wanted to get image dimensions using JavaScript? In this article, I am going to share an easy way to use <em><strong>JavaScript to get image dimensions (width &amp; height)</strong>.</em><span id="more-928"></span></p>
<h2>How to use JavaScript to Get Image Dimensions (Width &amp; Height)</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=928" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<p>Following is the complete HTML + JavaScript source code that shows how to get the image dimensions (width &amp; height) when the page is loaded:</p>
<h3>Example: Get Image Width &amp; Height (dimensions) using JavaScript</h3>
<pre class="lang:xhtml decode:true">&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Javascript Get Image Dimensions&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;img src="images/banner.png" id="my_img" /&gt;

&lt;script type="text/javascript"&gt;

var img = document.getElementById('my_img');

var width = img.clientWidth;

var height = img.clientHeight;

alert( 'Width: ' + width + ' Height:' + height );

&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The given code assumes that there is an image with ID &#8220;my_img&#8221; and the dimensions of this image needs to be found. When the above code is executed, the page will alert the width and height of the image.</p>
<h4>Note</h4>
<p>The image has to be completely loaded in order to get it&#8217;s size, or the width &amp; height values are incorrectly shown as zero.</p>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=928" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<h5>That&#8217;s it!</h5>
<p>Do you know of any other ways to <em><strong>find image width and height using JavaScript</strong></em>? Feel free to share by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/javascript-get-image-dimensions-get-image-width-height/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">928</post-id>	</item>
	</channel>
</rss>
