<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Rajesh Bhutani's Blog</title><link>http://blogs.msdn.com/rajeshbhutani/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Using Jscript based IE Add-On to export data from any website</title><link>http://blogs.msdn.com/rajeshbhutani/archive/2007/07/12/using-jscript-based-ie-add-in-to-export-data-from-any-website.aspx</link><pubDate>Thu, 12 Jul 2007 16:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3831573</guid><dc:creator>rajesh.bhutani@microsoft.com</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/rajeshbhutani/comments/3831573.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rajeshbhutani/commentrss.aspx?PostID=3831573</wfw:commentRss><description>&lt;p&gt;Often times we browse to a website which has lot of data in tabular format, or we login to secure website which displays data like financial transactions etc. in a neatly formated tabular format. Sometimes we have a need to export such data into another tool, if the website supports such an export good, otherwise we have to manually cut and paste the data into a text file, and painfully convert it into the desired format of the target tool. This process can be very lengthy, painful and error prone. We can use some kind of a script to try to automate some part of&amp;nbsp;this process&amp;nbsp;specially the post processing of the cut-and-pasted data to get into the desired format. But the final process is still not completely automated and has lots of manual steps involved.&lt;/p&gt;
&lt;p&gt;What if we can easily write an add-on for the browser which can, not only extract the right set of data from a website we are browsing but can also easily convert it into any format we desire.&amp;nbsp;In this blog post I will give step-by-step instruction on how to develop a Jscript based IE Add-On to achieve exactly such a solution.&lt;/p&gt;
&lt;p&gt;In this example we will use an online stocks and mutual funds trading&amp;nbsp;website &lt;a href="http://www.icicidirect.com/" mce_href="http://www.icicidirect.com/"&gt;www.icicidirect.com&lt;/a&gt; and&amp;nbsp;write an IE&amp;nbsp;add-on to extract trade transaction details from it, and then to&amp;nbsp;export it in QIF format so that it can be imported into personal finance tools like Microsoft Money.&lt;/p&gt;&lt;p&gt;There are&amp;nbsp; four major requirements for this add-on:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;We should be able to invoke it from IE while browsing a web page and it should be allowed to access the contents of that web page.&lt;br&gt;&lt;/li&gt;&lt;li&gt;It should be able to traverse the contents of the web page easily and locate the fields which are of interest.&lt;/li&gt;&lt;li&gt;It should be able to easily convert the data in the desired output format.&lt;/li&gt;&lt;li&gt;And finally it should be able to write the data at the desired location on user machine.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;For the first requirement i.e. attaching it to IE, we will make use of the "&lt;a href="http://msdn2.microsoft.com/en-us/library/aa753589.aspx" target="_blank" mce_href="http://msdn2.microsoft.com/en-us/library/aa753589.aspx"&gt;Adding Entries to the Standard Context Menu&lt;/a&gt;" facility in IE. There are many different ways to extend functionality in IE but this one is one of the simpler ones and it satisfies our requirement perfectly. Only thing we need to do for this is to run the following command:&lt;/p&gt;&lt;p&gt;&lt;span class="style4"&gt;REG ADD "HKCU\Software\Microsoft\Internet Explorer\MenuExt\icicidirect2qif" 
/ve /d "file://C:\Program Files\EXTENDIE\&lt;/span&gt;&lt;span class="style4"&gt;icicidirect2qif&lt;/span&gt;&lt;span class="style4"&gt;.htm"&lt;/span&gt;&lt;/p&gt;&lt;p&gt;What this does is add registry entry for IE to start showing 'icicidirect2qif' as an item in the context menu which shows up anytime you right click in a web page. And when you click on that item IE will run the file "C:\Program Files\EXTENDIE\icicidirect2qif.htm" in context of that web page. The file icicidirect2qif.htm can contain Jscript code written inside the tags &amp;lt;SCRIPT&amp;gt;...&amp;lt;/SCRIPT&amp;gt; e.g.&lt;/p&gt;&lt;p&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; ...&lt;/p&gt;&lt;p&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;&lt;p&gt;For the second requirement, when IE calls into icicidirect2qif.htm, the script code inside this page can use DOM element "external.menuArguments.document" to access any and all the contents of the web page currently being browsed in IE. In your Jscript code you can use one or more of the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms535862.aspx" target="_blank" mce_href="http://msdn2.microsoft.com/en-us/library/ms535862.aspx"&gt;properties or methods available in IE to traverse through the 'document' object&lt;/a&gt;. Our target web page in icicidirect site had named &amp;lt;text&amp;gt; fields containing the transaction details like 'date', 'amount', 'mutual fund name', 'price' etc. so we have used the DOM call "&lt;a href="http://msdn2.microsoft.com/en-us/library/ms536438.aspx" target="_blank" mce_href="http://msdn2.microsoft.com/en-us/library/ms536438.aspx"&gt;getElementsByName&lt;/a&gt;" to locate and get data for the fields we are interested in, for example "var date = doc.getElementsByName("trans_date"+i)[0];" etc.&lt;/p&gt;&lt;p&gt;For the third requirement, Jscript has a number of useful "String" and "Number" APIs to work with the data we have extracted out of the web page and to convert it to any target format we are interested in, for example we have used code like:&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var units = doc.getElementsByName("Trans_Units"+i)[0].value;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; units = units.replace(/,/g, "");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; amount = new Number(amount); units = new Number(units);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var price = amount/units; &lt;/p&gt;&lt;p&gt;to automatically calculate 'price' information for a transaction given the 'amount' and 'quantity' information extracted from the web page.&lt;/p&gt;&lt;p&gt;For the fourth and final requirement, Jscript has multiple ways to write data out, one of the simplest method is to use the 'document.write()' API to print output in the currently browsed web page itself. Alternatively you can also access the 'clipboard' object from Jscript and write output into the clipboard which can later be pasted into any application you want. We have used '&lt;a href="http://msdn2.microsoft.com/en-us/library/z9ty6h50.aspx" target="_blank" mce_href="http://msdn2.microsoft.com/en-us/library/z9ty6h50.aspx"&gt;ActiveXObject("Scripting.FileSystemObject")&lt;/a&gt;' to write out our data into a file on user's machine as follows:&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var fso = new ActiveXObject("Scripting.FileSystemObject");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var FileObject = fso.OpenTextFile("d:\\export.qif",8,true,0);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileObject.WriteLine("D"+date[1]+"/"+date[0]+"/"+date[2]);&lt;br&gt;&lt;/p&gt;&lt;p&gt;In fact there is another ActiveXObject &lt;a href="http://msdn2.microsoft.com/en-us/library/ms630455.aspx" target="_blank" mce_href="http://msdn2.microsoft.com/en-us/library/ms630455.aspx"&gt;Shell.Application&lt;/a&gt;, which can be used in the end to automatically invoke Microsoft Money QIF import tool to start and load the QIF file we have just written out in our example we skipped this because we were writing out an 'investment' account which needs to be loaded into Money using 'File-&amp;gt;Import-&amp;gt;Restore Account' while the standard QIF import tool in Money works for the normal 'banking' account:&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var oShell = new ActiveXObject("Shell.Application");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oShell.ShellExecute("d:\\export.qif");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oShell = null;&lt;br&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Here is the code for the complete "icicidirect2qif.htm":&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;lt;script type="text/javascript"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var activityArray = {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "P":"Buy",&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "D":"Div",&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "DR":"ReinvDiv",&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "R":"Sell"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var doc = external.menuArguments.document;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var i = 0;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (doc.getElementsByName("trans_date"+i)[0] != null) i++;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var fso = new ActiveXObject("Scripting.FileSystemObject");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fso.DeleteFile("d:\\export.qif");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var FileObject = fso.OpenTextFile("d:\\export.qif",8,true,0);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileObject.WriteLine("!Type:Invst");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (i--) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var date = doc.getElementsByName("trans_date"+i)[0];&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date = date.value;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date = date.split(" ")[0];&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date = date.split("-");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileObject.WriteLine("D"+date[1]+"/"+date[0]+"/"+date[2]);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var amount = doc.getElementsByName("Trans_Amt"+i)[0].value;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; amount = amount.replace(/,/g, "");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileObject.WriteLine("T"+amount);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var activity = doc.getElementsByName("trans_cd"+i)[0].value;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (activityArray[activity] != null) activity = activityArray[activity];&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileObject.WriteLine("N"+activity);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var fund = doc.getElementsByName("Fund_Name"+i)[0].value;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fund = fund.split(" ")[0];&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var scheme = doc.getElementsByName("Scheme_Name"+i)[0].value;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileObject.WriteLine("Y"+fund+" "+scheme);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var units = doc.getElementsByName("Trans_Units"+i)[0].value;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; units = units.replace(/,/g, "");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; amount = new Number(amount); units = new Number(units);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var price = amount/units;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileObject.WriteLine("I"+price.toFixed(6));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileObject.WriteLine("Q"+units.toString());&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (activity == "Div" || activity == "ReinvDiv") {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileObject.WriteLine("LInvestment Income:Dividends");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (activity == "Sell") {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileObject.WriteLine("LInvestment Income:Capital Gains");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileObject.WriteLine("^");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileObject.close();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*var oShell = new ActiveXObject("Shell.Application");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oShell.ShellExecute("d:\\export.qif");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oShell = null;*/&lt;br&gt;&amp;lt;/script&amp;gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3831573" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/Jscript/default.aspx">Jscript</category><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/IE/default.aspx">IE</category><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/Finance/default.aspx">Finance</category><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/Microsoft+Money/default.aspx">Microsoft Money</category></item><item><title>Video: Debugging Jscript code in IE using VWD</title><link>http://blogs.msdn.com/rajeshbhutani/archive/2007/04/18/video-debugging-jscript-code-in-ie-using-vwd.aspx</link><pubDate>Wed, 18 Apr 2007 11:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2171246</guid><dc:creator>rajesh.bhutani@microsoft.com</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/rajeshbhutani/comments/2171246.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rajeshbhutani/commentrss.aspx?PostID=2171246</wfw:commentRss><description>&lt;P&gt;In my last post I listed some steps to debug client side Jscript code running in IE, using VWD. If you want you can watch these steps in action at the following screencast posted at the channel9 website:&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://channel9.msdn.com/ShowPost.aspx?PostID=301814" target=_blank mce_href="http://channel9.msdn.com/ShowPost.aspx?PostID=301814"&gt;&lt;IMG src="http://channel9.msdn.com/Photos/301814.jpg" mce_src="http://channel9.msdn.com/Photos/301814.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://channel9.msdn.com/ShowPost.aspx?PostID=301814" target=_blank mce_href="http://channel9.msdn.com/ShowPost.aspx?PostID=301814"&gt;http://channel9.msdn.com/ShowPost.aspx?PostID=301814&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2171246" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/Jscript/default.aspx">Jscript</category><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/debug/default.aspx">debug</category><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/VS/default.aspx">VS</category><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/IE/default.aspx">IE</category></item><item><title>Debugging Jscript code in IE using VWD Express</title><link>http://blogs.msdn.com/rajeshbhutani/archive/2007/04/10/debugging-jscript-code-in-ie-using-vwd-express.aspx</link><pubDate>Tue, 10 Apr 2007 12:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2070632</guid><dc:creator>rajesh.bhutani@microsoft.com</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/rajeshbhutani/comments/2070632.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rajeshbhutani/commentrss.aspx?PostID=2070632</wfw:commentRss><description>&lt;P&gt;If you want to debug Jscript code in your web pages in IE, then you can make use of the "Visual Web Developer" (VWD)&amp;nbsp;tool which is available as a free download from Microsoft website. VWD is a tool which is mainly used to author and debug your own web sites. However if you want to debug Jscript code in a web page which you have not authored or which is served from a&amp;nbsp;remote web server or http location, then you need to create a dummy web site project in VWD and set it up to launch your web page when you start debugging.&lt;/P&gt;
&lt;P&gt;Following are the exact steps to acomplish this:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Calibri color=#1f497d&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;Install VWD Express [Free download available from &lt;A href="http://msdn.microsoft.com/vstudio/express/vwd/default.aspx" mce_href="http://msdn.microsoft.com/vstudio/express/vwd/default.aspx"&gt;http://msdn.microsoft.com/vstudio/express/vwd/default.aspx&lt;/A&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Calibri color=#1f497d&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;Start&amp;nbsp;Internet Explorer&amp;nbsp;and enable script debugging by switching off the&amp;nbsp;menu option in IE 'Tools -&amp;gt; Internet Options -&amp;gt; Advanced -&amp;gt; Browsing -&amp;gt; Disable script debugging'. Exit Internet Explorer, from now on all new invocations of IE will have script debugging enabled in it.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Calibri color=#1f497d&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Calibri color=#1f497d&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;Start VWD. On Vista use 'Run as adminstrator' when starting VWD, so that it doesn't have problem connecting to IE for debugging.&lt;/SPAN&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Calibri color=#1f497d&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;In VWD, c&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;reate a new empty website project. &lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Calibri color=#1f497d&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;In this project e&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;dit its ‘Properties-&amp;gt;Start Options-&amp;gt;Start URL’ to launch the URL you want to debug. &lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Calibri color=#1f497d&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;Preferably switch off ‘default debug server’ and ‘ASP.NET’ debugger also because you don’t need them for this simple client side debugging&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Calibri color=#1f497d&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;In VWD ‘Start Debug’, it will launch IE with your URL.&amp;nbsp;In VWD use&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Calibri color=#1f497d&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;&amp;nbsp;‘Debug-&amp;gt;Windows-&amp;gt;Script Explorer’, it will show your html page and other script files loaded in the page. &lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Calibri color=#1f497d&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;Select the pages you are interested in debugging and set break points.&amp;nbsp;E&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Calibri color=#1f497d&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;xercise the web page in IE, when it reaches your break points, VWD will come in focus automatically. &lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Calibri color=#1f497d&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;Step thru, continue, check variables etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Calibri color=#1f497d&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;End of the debugging, close both IE as well as&amp;nbsp;VWD. &lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Calibri color=#1f497d&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;Preferably turn off script debugging in IE.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Calibri color=#1f497d&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;For next debugging session if you want you can re-use the same website project you have created above. If you want to debug a different web page, you can simply load that in internet explorer window which is launched from VWD, the script debugger will automatically start showing whatever web page you are currently browsing.&lt;/SPAN&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;FONT face=Calibri color=#1f497d&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: windowtext; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Calibri color=#1f497d&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2070632" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/Jscript/default.aspx">Jscript</category><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/debug/default.aspx">debug</category><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/VS/default.aspx">VS</category><category domain="http://blogs.msdn.com/rajeshbhutani/archive/tags/IE/default.aspx">IE</category></item></channel></rss>