<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/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>Client Side Web Development</title><link>http://forums.asp.net/130.aspx</link><description>Client-side programming discussions, including CSS, DHTML, JScript/Javascript, etc. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=18&amp;c=16" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/2417610.aspx</link><pubDate>Thu, 12 Jun 2008 00:06:06 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2417610</guid><dc:creator>Jeff.aspx</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2417610.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2417610</wfw:commentRss><description>&lt;p&gt;By the way, with the release of Visual Studio 2008 SP1, &amp;quot;Format Document&amp;quot; for .js files will be supported.&amp;nbsp; Additionally, we will support formatting as you type.&amp;nbsp; More information here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/webdevtools/archive/2008/05/12/introducing-jscript-formatting-in-vs-2008-sp1.aspx"&gt;http://blogs.msdn.com/webdevtools/archive/2008/05/12/introducing-jscript-formatting-in-vs-2008-sp1.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/2408854.aspx</link><pubDate>Sun, 08 Jun 2008 01:21:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2408854</guid><dc:creator>Bobzee</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2408854.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2408854</wfw:commentRss><description>&lt;p&gt;Until Visual Studio adds that feature,&amp;nbsp; Try&amp;nbsp;&lt;a href="http://elfz.laacz.lv/beautify/"&gt;http://elfz.laacz.lv/beautify/&lt;/a&gt;&amp;nbsp; pretty cool online formatter for javascript&lt;/p&gt;</description></item><item><title>Re: Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/2080102.aspx</link><pubDate>Fri, 28 Dec 2007 05:16:10 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2080102</guid><dc:creator>jtoth55</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2080102.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2080102</wfw:commentRss><description>&lt;p&gt;It certainly would make my life a lot easier right now, taking some 3rd party javascript code which was compressed by removing all of the spaces and carriage returns&amp;nbsp;and having all of the code on one line... :(&lt;/p&gt;</description></item><item><title>Re: Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/1941969.aspx</link><pubDate>Fri, 05 Oct 2007 02:22:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1941969</guid><dc:creator>rbb555</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1941969.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=1941969</wfw:commentRss><description>&lt;p&gt;Actually, maybe another way to approach this would be to have a &amp;quot;format as&amp;quot; function in the formatter - select a bunch of whatever, and apply the same formatting rules.&lt;/p&gt;&lt;p&gt;This would be an awesome feature allowing a standard formatting schema for C++, C#, javascript etc etc etc&amp;nbsp;&lt;/p&gt;&lt;p&gt;This would also solve the problem of embedded code sections in .aspx files and the like - 10 lines of javascript&amp;nbsp; - hey format that sucker as javascript/C#, 10 lines of HTML - format that sucker too -&amp;nbsp; some C# or VB code within &amp;lt;% %&amp;gt; tags - select that sucker and format as desired! Wow - I love it!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Similarly those of use who are pedants and like to see our HTML formatted the same as our XML - would be really happy.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;Thanks for listening&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/1702159.aspx</link><pubDate>Wed, 09 May 2007 13:51:44 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1702159</guid><dc:creator>andyb90</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1702159.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=1702159</wfw:commentRss><description>&lt;p&gt;It sure would be great to have a javascript formatter in Visual Studio.&lt;/p&gt;
&lt;p&gt;Right now, I cut/paste my javascript (in&amp;nbsp;my .aspx/.ascx files)&amp;nbsp;to my Visual Slick Edit editor, "Beautify" it, then paste it back into Visual Studio.&amp;nbsp; Sure would be nice to skip this step!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Andy&lt;/p&gt;</description></item><item><title>Re: Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/1602915.aspx</link><pubDate>Fri, 02 Mar 2007 21:36:20 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1602915</guid><dc:creator>SuperGhost</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1602915.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=1602915</wfw:commentRss><description>&lt;p&gt;JavaScript formatting would be great. I've noticed over the past year our team has started using JavaScript a lot more.&amp;nbsp;Would help out with coding standards especially now that ASP.NET AJAX is released. You know those brackets are all over the place:&lt;/p&gt;
&lt;p&gt;function multiply(one, two) {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function multiply(one, two)&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function multiply(one, two) { }&lt;/p&gt;</description></item><item><title>Re: Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/1602890.aspx</link><pubDate>Fri, 02 Mar 2007 21:19:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1602890</guid><dc:creator>danmor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1602890.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=1602890</wfw:commentRss><description>&lt;blockquote&gt;&lt;div&gt;&lt;img src="http://forums.asp.net/Themes/default/images/icon-quote.gif" /&gt; &lt;strong&gt;Jeff.aspx:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;Hey Dan,&lt;/p&gt;&lt;p&gt;Formatting is NOT currently available for JavaScript in Visual Studio 2005...Customer feedback from you guys would definitely help! =)&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt;
I can tell you that this feature would help everyone who works on the Windows Live properties (http://spaces.live.com, http://local.live.com, etc) because we have so much client-side script on our pages now.  If you want more information, or a more formal 'feature request' just send me an internal e-mail.  I'm on the Spaces team now.</description></item><item><title>Re: Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/1590127.aspx</link><pubDate>Thu, 22 Feb 2007 15:08:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1590127</guid><dc:creator>JoshStodola</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1590127.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=1590127</wfw:commentRss><description>&lt;p&gt;Jeff,&lt;/p&gt;
&lt;p&gt;This day in age, there is an abundance of Javascript examples and references online.&amp;nbsp; A lot of people don't want to re-invent the wheel so they do a quick search and find a suitable&amp;nbsp;javascript example in a matter of minutes and tweak it to perfectly meet their needs.&amp;nbsp; I have done this so many times, it is almost natural.&amp;nbsp; Unfortunately, the perfectionist in me forces me to re-do the indentation and whitespacing of these examples just to be uniform with my other javascript functions.&amp;nbsp; Because of this, I think it would be far more usable and practical&amp;nbsp;to include Javascript formatting in Visual Studio.&amp;nbsp; If I had a choice of one formatting to be available, I would choose the Javascript formatting over any other.&amp;nbsp; It just makes sense to me because I very rarely have to format any other code.&lt;/p&gt;
&lt;p&gt;Tell Mr. Guthrie that it has to be done &lt;img src="http://forums.asp.net/emoticons/emotion-3.gif" alt="Surprise" /&gt;&lt;/p&gt;</description></item><item><title>Re: Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/1589541.aspx</link><pubDate>Thu, 22 Feb 2007 07:03:39 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1589541</guid><dc:creator>Jeff.aspx</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1589541.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=1589541</wfw:commentRss><description>&lt;p&gt;Hey Dan,&lt;/p&gt;&lt;p&gt;Formatting is NOT currently available for JavaScript in Visual Studio 2005 and current plans dictate that it won't be available for Visual Studio "Orcas" either.&amp;nbsp; I'm actually trying to fit the feature into our schedule at the moment.&amp;nbsp; I'd personally would really like to see this done.&amp;nbsp; Customer feedback from you guys would definitely help! =)&lt;/p&gt;&lt;p&gt;Hope this helps,&lt;br /&gt;Jeff&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/1589465.aspx</link><pubDate>Thu, 22 Feb 2007 05:15:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1589465</guid><dc:creator>A1ien51</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1589465.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=1589465</wfw:commentRss><description>&lt;p&gt;I just wrote this in a few minutes. It is very crude on how it works. It loops through the text looking for { or } or ; using a setTimeout. Reason for setTimeout is big loops freeze the browser. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://www.pascarello.com/examples/formatCode.html"&gt;http://www.pascarello.com/examples/formatCode.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It will make some things look funny, but it is better than nothing. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;If I did not have the flu and I did not have tons of work to do and if&amp;nbsp;it was before midnight I might have tried a little harder using split()&amp;nbsp;with regular expressions&amp;nbsp;to reduce a bunch of redundant calls&amp;nbsp;that charAt() causes.&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;</description></item><item><title>Re: Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/1589140.aspx</link><pubDate>Wed, 21 Feb 2007 22:55:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1589140</guid><dc:creator>danmor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1589140.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=1589140</wfw:commentRss><description>&lt;p&gt;I'm not sure.&amp;nbsp; T&lt;font size=2&gt;he variable names are human readable, but the spacing seems as if it was optimized by either a program or standard regular expressions&lt;/font&gt;.&amp;nbsp; Here's a sample:&lt;/p&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;if(isRef)&lt;/p&gt;
&lt;p&gt;{this.dtRefresh=(new Date()).getTime();}}};function initACB(divid,Id,fw,fh)&lt;/p&gt;
&lt;p&gt;{adCont[Id].acbObj=null;adCont[Id].acb=(typeof(adCont[Id].acb)!='undefined')?adCont[Id].acb:true;var acbNeeded=(fw&amp;lt;acbMinWdth)?false:adCont[Id].acb;if(adCont[Id].acb)&lt;/p&gt;
&lt;p&gt;{var lbl=acbAdv;_dapUtils.acbSetLg();var acbLocLg=_dapUtils.acbLg!="en"&amp;amp;&amp;amp;_dapUtils.acbLg!="noacb";if(acbLocLg)&lt;/p&gt;
&lt;p&gt;{lbl="";acbGetLocStrs(adCont[Id].divid);}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&lt;/font&gt;</description></item><item><title>Re: Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/1589080.aspx</link><pubDate>Wed, 21 Feb 2007 22:11:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1589080</guid><dc:creator>JoshStodola</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1589080.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=1589080</wfw:commentRss><description>Has it been compacted by human hands or by a programmatic obfuscator?</description></item><item><title>Is there a 'Format Document' function for .js files?</title><link>http://forums.asp.net/thread/1588928.aspx</link><pubDate>Wed, 21 Feb 2007 20:23:04 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1588928</guid><dc:creator>danmor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1588928.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=1588928</wfw:commentRss><description>The Web Forms editor (viewing ASPX&amp;nbsp;source) has a command "Edit | Advanced -&amp;gt; Format Document".&amp;nbsp; This command doesn't exist when I open up a .js file for editing.&amp;nbsp; I have some scrpt that has been compacted, and is impossible to read.&amp;nbsp; Is there any way to automatically format the JavaScript so it is readable (insert line breaks and tabs, etc.)?</description></item></channel></rss>