<?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>Burad&#039;s Blog &#187; DOM</title>
	<atom:link href="http://www.aburad.com/blog/tag/dom/feed" rel="self" type="application/rss+xml" />
	<link>http://www.aburad.com/blog</link>
	<description>A computer nerd who would soon be an MBA</description>
	<lastBuildDate>Thu, 28 Oct 2010 15:53:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Firebug : web development evolved</title>
		<link>http://www.aburad.com/blog/2007/02/firebug-web-development-evolved.html</link>
		<comments>http://www.aburad.com/blog/2007/02/firebug-web-development-evolved.html#comments</comments>
		<pubDate>Mon, 12 Feb 2007 10:22:00 +0000</pubDate>
		<dc:creator>burad</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[web developer]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://aburad.com/blog/?p=183</guid>
		<description><![CDATA[I found firebug very useful while developing my Paint Chat (which is not a big code as such but still), so here it goes in admiration of firebug: Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript [...]]]></description>
			<content:encoded><![CDATA[<p>I found <a href="http://getfirebug.com/">firebug</a> very useful while developing my <a href="http://www.aburad.com/paintchat/paint_chat.php">Paint Chat</a> (which is not a big code as such but still), so here it goes in admiration of firebug:</p>
<blockquote><p>Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.</p></blockquote>
<p>Firebug is firefox addon that helps you in webdevelopment with <a href="http://bp2.blogger.com/_qhHaEAh26gI/RdBHekqmA4I/AAAAAAAAAFA/uiypuTiwlUA/s1600-h/screenHome-js.gif" ><img border="0" src="http://bp2.blogger.com/_qhHaEAh26gI/RdBHekqmA4I/AAAAAAAAAFA/uiypuTiwlUA/s400/screenHome-js.gif" style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer" id="BLOGGER_PHOTO_ID_5030599374336820098" /></a><br />
its powerful feature such as javascript debugger, <a href="http://getfirebug.com/html.html">Inspect and edit HTML</a>, <a href="http://getfirebug.com/css.html">Tweak CSS to perfection</a>, <a href="http://getfirebug.com/net.html">Monitor network activity</a>, <a href="http://getfirebug.com/dom.html">Explore the DOM</a> and many more. Feature I like most is its quickly diagnosing problem, it allows you set break points and checking intermediate values of variable for javascript thus making a great javascript debugger. Many times you are stuck at where did the code went wrong so in way its a lot useful in saving time.</p>
<p><a href="http://bp3.blogger.com/_qhHaEAh26gI/RdBHS0qmA3I/AAAAAAAAAE4/R1D-ecbdTZ0/s1600-h/screenHome-logging.gif" ><img border="0" src="http://bp3.blogger.com/_qhHaEAh26gI/RdBHS0qmA3I/AAAAAAAAAE4/R1D-ecbdTZ0/s400/screenHome-logging.gif" style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer" id="BLOGGER_PHOTO_ID_5030599172473357170" /></a></p>
<p>I also like is its inspecting html and modifying html and css on fly and see the results with helpful tooltips. It also help in positioning of divs, images with its nice feature of visuallizing css metrics with ruler and box model coloring(HTML inspecting).<br />
<a href="http://bp0.blogger.com/_qhHaEAh26gI/RdBIeEqmA5I/AAAAAAAAAFI/VpSkfPTPxLc/s1600-h/screenHome-html.gif" ><img border="0" src="http://bp0.blogger.com/_qhHaEAh26gI/RdBIeEqmA5I/AAAAAAAAAFI/VpSkfPTPxLc/s400/screenHome-html.gif" style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer" id="BLOGGER_PHOTO_ID_5030600465258513298" /></a><br />
It other great feature is its interface which is comes with browser window split in two halves one for your website and one is extension interface (though it also can be detached from it). I am also a fan of <a href="https://addons.mozilla.org/firefox/60/">Web developer toolbar extension</a> but what it lacks is a java debugger and this great interface but both are a must of a web developer.</p>
<p>Related Post :</p>
<ul>
<li><a href="http://aburad.com/blog/2006/10/if-you-want-to-develop-firefox-extension.html">If you want to develop firefox extension..</a></li>
</ul>
<p><a href="http://www.getfirebug.com/?link=1" title="Firebug is a free web development tool for Firefox"><img border="0" src="http://www.getfirebug.com/images/firebug-web-development.png" alt="Firebug - Web Development Evolved" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aburad.com/blog/2007/02/firebug-web-development-evolved.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Play with html using javascript</title>
		<link>http://www.aburad.com/blog/2007/02/play-with-html-using-javascript.html</link>
		<comments>http://www.aburad.com/blog/2007/02/play-with-html-using-javascript.html#comments</comments>
		<pubDate>Sun, 11 Feb 2007 18:59:00 +0000</pubDate>
		<dc:creator>burad</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[gif]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://aburad.com/blog/?p=180</guid>
		<description><![CDATA[Javascipt can be very fruitful and flexible when it comes to modifying webapges dynamically (though client side). Javascript can be helpful in creating response to browser events like mouseup, mouseover etc, veryfying of form values prior to submitting them, changing style and value of html elements dynamically. Examples i disscuss here are being user by [...]]]></description>
			<content:encoded><![CDATA[<p>Javascipt can be very fruitful and flexible when it comes to modifying webapges dynamically (though client side). Javascript can be helpful in creating response to browser events like mouseup, mouseover etc, veryfying of form values prior to submitting them, changing style and value of html elements dynamically.<br />
Examples i disscuss here are being user by me in developing <a href="http://aburad.com/blog/2007/02/paint-chat.html">Paint Chat !!</a> So here I go..<br />
You can write javascript functions and code in section as:</p>
<blockquote>
<pre><code>&lt;script type="text/javascript"&gt;function test(){alert("test javascript");}&lt;/script&gt;</code></pre>
</blockquote>
<p><span style="font-style: italic"></span></p>
<h4>Action on events:</h4>
<p>Example of events can be mouseclick, keystroke, submitting form etc.<br />
With <span style="font-style: italic">onload()</span></p>
<blockquote>
<pre><code> &lt;body onload="init()"&gt;</code></pre>
</blockquote>
<p>Now <span style="font-style: italic">init()</span> function will be called when this html page is being loaded.<br />
For links, javascript function can be evoked when clicking, mouseover over links like</p>
<blockquote>
<pre><code> &lt;a href="javascript:replay()" mce_href="javascript:replay()"&gt;Refresh ! &lt;/a&gt;</code></pre>
</blockquote>
<p>Now function <span style="font-style: italic">replay()</span> will be called when Refresh! is clicked. For input text box</p>
<blockquote>
<pre><code>&lt;input type="text" size="30" id="search" onchange="suggest()"&gt;; </code></pre>
</blockquote>
<p>Now whenever content of textbox changes the function <span style="font-style: italic">suggest()</span> will be called. It can be useful when feature like google suggest has to be implemented or so.</p>
<p>On submitting forms:</p>
<blockquote>
<pre><code>&lt;form method="post" action="some.php" onsubmit="return checkForm()"&gt;</code></pre>
</blockquote>
<p>So whenever this form is being submitted <span style="font-style: italic">checkForm()</span> function will be called and can be helpful in verifying values of form elements.</p>
<p>onMouseOver and onMouseOut:</p>
<blockquote>
<pre><code>&lt;a href="http://www.aburad.com/blog" mce_href="http://www.aburad.com/blog" onmouseover="fade()"&gt;&lt;img src="image.gif" mce_src="image.gif"&gt; &lt;/a&gt;</code></pre>
</blockquote>
<p>Now when mouse is over image <span style="font-style: italic">fade()</span> function will be called and can be used for animate and styling purposes.<br />
<span style="font-style: italic"></span></p>
<h4>Registering of events</h4>
<p>A simple way can be:<br />
Conside the html code : <code>&lt;div id="sample"&gt; ..... some... html..text.. &lt;/div&gt; </code><br />
Now using javascript you can register event for this div by:</p>
<blockquote>
<pre><code> var div_sample = document.getElementById('sample');div_sample.onmousedown=sampleMouseDown ; </code></pre>
</blockquote>
<p>Now whenever mouseover ocours over this div html element <span style="font-style: italic">sampleMouseDown()</span> function will be called. Events can also be registered using <span style="font-style: italic">addEventListener() </span>. Find more information baout it here:<a href="http://www.quirksmode.org/js/events_advanced.html">Advanced event registration models</a><span style="font-style: italic"></span></p>
<h4>Modify Style and values for html elements</h4>
<p>Within some javascript function, you can first get the element object by <span style="font-style: italic">getElementByID()</span> <span style="font-style: italic">getElementsByName()</span> for example conside the javascript code:</p>
<blockquote><p><code>document.getElementById("colorcode").innerHTML = "#000000";<br />
document.getElementById("bgtest").style.backgroundColor= "green";<br />
</code></p></blockquote>
<p>The first line find the html element with id <span style="font-style: italic">colorcode</span> and then set its value to &#8220;#000000&#8243; using <span style="font-style: italic">innerHTML</span>. In second line, it sets the background of html element with id &#8220;bgtest&#8221; to green.</p>
<p><span style="font-weight: bold">Some other tweaks which were useful :</span></p>
<ul>
<li>Calling some function repeatedly with some time interval, consider javascript code:</li>
</ul>
<blockquote><p><code>var intervalID = setInterval(drawCurve, 100);<br />
</code></p></blockquote>
<p>So the drawCurve() function will be called repeatedly after 100ms. You can cancel this process( removing repeatedly calling) by <code>clearInterval(intervalID);</code></p>
<ul>
<li>You can use <code>setTimeout(drawCurve,100)</code> function to delay <span style="font-style: italic">drawCurve()</span> execution for a specified time period(100ms).</li>
</ul>
<ul>
<li>Calling a php function inside javascript:</li>
</ul>
<blockquote><p><code>var testImg = new Image();<br />
testImg.src="form.php?name=form_value" mce_src="form.php?name=form_value";<br />
</code></p></blockquote>
<p>Now here in <span style="font-style: italic">form.php</span> you can fetch value of variable <span style="font-style: italic">name</span> using <span style="font-weight: bold">$_GET</span> and can perform appropriate action.</p>
<p><span style="font-weight: bold">Some links:</span></p>
<ul>
<li><a href="http://www.w3schools.com/js/js_examples.asp">W3Schools: Javascript Examples</a></li>
<li><a href="http://developer.mozilla.org/en/docs/JavaScript">MDC: Javascript</a></li>
<li><a href="http://www.alistapart.com/articles/domtricks2/">DOM Design Tricks</a></li>
<li><a href="http://www.quirksmode.org/js/events_events.html">The events</a></li>
<li><a href="http://particletree.com/features/javascript-basics-for-prototyping/">Javascript Basic for Prototyping</a></li>
</ul>
<p><span style="font-weight: bold">Related Posts:</span></p>
<ul>
<li><a href="http://aburad.com/blog/2006/03/little-tweaks-with-javascript-bookmarklets.html">Little tweaks with javascript : Bookmarklets.</a></li>
<li><a href="http://aburad.com/blog/2006/10/if-you-want-to-develop-firefox-extension.html">If you want to develop firefox extension..</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.aburad.com/blog/2007/02/play-with-html-using-javascript.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

