<?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>devtrends.com &#187; HTML</title>
	<atom:link href="http://www.devtrends.com/index.php/category/software-development/web-development/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devtrends.com</link>
	<description>developing trends in information technology</description>
	<lastBuildDate>Fri, 03 Sep 2010 21:32:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Add Printers Using VBScript on an Intranet Site</title>
		<link>http://www.devtrends.com/index.php/add-printers-using-vbscript-on-an-intranet-site/</link>
		<comments>http://www.devtrends.com/index.php/add-printers-using-vbscript-on-an-intranet-site/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 20:11:12 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[WScript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Windows Script]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=348</guid>
		<description><![CDATA[Recently I had been tasked to create an Intranet site that simplified the process of adding printers to workstations. In addition, the process had to be completely in the user’s control, eliminating the need for IT to be involved with workstation printer drivers. If a...]]></description>
			<content:encoded><![CDATA[<p>Recently I had been tasked to create an Intranet site that simplified the process of adding printers to workstations. In addition, the process had to be completely in the user’s control, eliminating the need for IT to be involved with workstation printer drivers. If a user moved or a printer went down, the user would be responsible for adding a new network printer to his or her workstation. Below is a variation of the script I used&#8230;</p>
<p><strong>VBScript</strong></p>
<p>Adding VBScript to a web page is as easy as adding JavaScript; you will use the &lt;script&gt; tag with a different language type defined. The only additional requirement for getting VBScript to run properly is to ensure that your Intranet site is set as a Trusted Site in Internet Explorer &#8212; for obvious reasons this is required.</p>
<pre style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;">&lt;SCRIPT&gt;
&lt;!--
      Function addPrinter(mynum)
          Dim mypath, myname

          On Error Resume Next

          Select Case (mynum)
               Case "1"
                   mypath = <a href="file://\\PRINTSERVER\PRINTER1">\\PRINTSERVER\PRINTER1</a>
                   myname = "PRINTER1"
               Case "2"
                   mypath = <a href="file://\\PRINTSERVER\PRINTER2">\\PRINTSERVER\PRINTER2</a>
                   myname = "PRINTER2"
          End Select

          Dim WSHNet
          Set WSHNet = CreateObject("WScript.Network")
          WSHNet.AddWindowsPrinterConnection mypath

          strMbox = MsgBox("Would you like to make " &amp; myname &amp; " your default printer?",3,"Printer")
          If strMbox = 6 Then
              WSHNet.SetDefaultPrinter mypath
          Else
              'nothing to do...
          End If

          If Err &lt;&gt; 0 Then
                MsgBox "Please contact the IT HelpDesk."
                Err.Clear
                Exit Function
          End If

          MsgBox "The printer, " &amp; myname &amp; ", has been installed on your workstation!"

      End Function

//--&gt;
&lt;/SCRIPT&gt;</pre>
<p><strong>Broken Down</strong></p>
<p>For the people that are more than interested of just plagiarizing my code, I’ll explain the function in a little bit of detail. First, the function is called as you would call a JavaScript function, such as by using an onclick=”” method. Second, pass a variable to the function to define which printer should be installed.</p>
<p>In my case, I had drawn out simple floor plans of our facilities and placed printer icons in &lt;div&gt; tags throughout the map. When the user clicked on the icon, the VBScript function is initiated and the printer is installed. For those that are unfamiliar with the onclick method, you can apply it to many HTML objects, such as &lt;a href&gt; tag or &lt;img&gt; or &lt;div&gt;. If you apply onclick to a div statement, you will probably want to assign the style “cursor:hand;” to change the cursor to a hand pointer, letting the user know this is a clickable area.</p>
<p>The code uses a Windows Scripting namespace called WScript.Network. A defined method in WScript.Network, AddWindowsPrinterConnection, allows the scripter to easily add a networked printer to the workstation. In my script, the only variable passed to this method is the UNC path of the network printer. Shortly following the printer add method, the user is asked if he or she would like to make it the default printer. If true, then a defined method is WScript.Network, SetDefaultPrinter, is called with one variable passed to it, the UNC path to the network printer. On any type of error a generic message is display to contact the IT HelpDesk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/add-printers-using-vbscript-on-an-intranet-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>URL Encoding Table</title>
		<link>http://www.devtrends.com/index.php/url-encoding-table/</link>
		<comments>http://www.devtrends.com/index.php/url-encoding-table/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 23:54:26 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[URL Encoding]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=257</guid>
		<description><![CDATA[Update: because I am frequently encoding or decoding strings, I have created a URL encode and decode script for use on my site. Anyone that has programmed in web technologies has used URL encoded characters at some point. For those are wondering, one of the...]]></description>
			<content:encoded><![CDATA[<p>Update: because I am frequently encoding or decoding strings, I have created a <a href="http://www.devtrends.com/index.php/portfolio/useful-tools/url-encode-and-decode/">URL encode and decode</a> script for use on my site.</p>
<p>Anyone that has programmed in web technologies has used URL encoded characters at some point. For those are wondering, one of the purposes of URL encoding is to allow certain characters in a URL string that would otherwise be prohibited as anything other than their original purpose. An example would be =, which is typically used as part of the querystring structure &#8211; if you were to add this character to your querystring, not intending it as an equal sign defining another querystring variable, it would break your querystring statement intention. There are many other uses for URL encoding, and as you develop web technologies you will find yourself using them more often than not.</p>
<p>The digits following the % sign is a hexadecimal equivalent of the ASCII decimal number for that character. For an example, visit the <a href="http://www.cppreference.com/wiki/ascii" target="_blank">ACSII Chart located at cppreference.com</a>.</p>
<p>As a real example, I am using URL encoding in the Source= statement with SharePoint Services. For more information on source= with SharePoint, see my other <a href="http://www.devtrends.com/index.php/redirect-share…different-page/" target="_self">article</a>.</p>
<table style="border:1px dashed #999999;" border="0">
<tbody>
<tr>
<td>character</td>
<td>URL code</td>
<td>ASCII</td>
</tr>
<tr>
<td>space</td>
<td>%20</td>
<td>32</td>
</tr>
<tr>
<td>!</td>
<td>%21</td>
<td>33</td>
</tr>
<tr>
<td>&#8220;</td>
<td>%22</td>
<td>34</td>
</tr>
<tr>
<td>#</td>
<td>%23</td>
<td>35</td>
</tr>
<tr>
<td>$</td>
<td>%24</td>
<td>36</td>
</tr>
<tr>
<td>%</td>
<td>%25</td>
<td>37</td>
</tr>
<tr>
<td>&amp;</td>
<td>%26</td>
<td>38</td>
</tr>
<tr>
<td>&#8216;</td>
<td>%27</td>
<td>39</td>
</tr>
<tr>
<td>(</td>
<td>%28</td>
<td>40</td>
</tr>
<tr>
<td>)</td>
<td>%29</td>
<td>41</td>
</tr>
<tr>
<td>*</td>
<td>%2A</td>
<td>42</td>
</tr>
<tr>
<td>+</td>
<td>%2B</td>
<td>43</td>
</tr>
<tr>
<td>,</td>
<td>%2C</td>
<td>44</td>
</tr>
<tr>
<td>-</td>
<td>%2D</td>
<td>45</td>
</tr>
<tr>
<td>.</td>
<td>%2E</td>
<td>46</td>
</tr>
<tr>
<td>/</td>
<td>%2F</td>
<td>47</td>
</tr>
<tr>
<td>0</td>
<td>%30</td>
<td>48</td>
</tr>
<tr>
<td>1</td>
<td>%31</td>
<td>49</td>
</tr>
<tr>
<td>2</td>
<td>%32</td>
<td>50</td>
</tr>
<tr>
<td>3</td>
<td>%33</td>
<td>51</td>
</tr>
<tr>
<td>4</td>
<td>%34</td>
<td>52</td>
</tr>
<tr>
<td>5</td>
<td>%35</td>
<td>53</td>
</tr>
<tr>
<td>6</td>
<td>%36</td>
<td>54</td>
</tr>
<tr>
<td>7</td>
<td>%37</td>
<td>55</td>
</tr>
<tr>
<td>8</td>
<td>%38</td>
<td>56</td>
</tr>
<tr>
<td>9</td>
<td>%39</td>
<td>57</td>
</tr>
<tr>
<td>:</td>
<td>%3A</td>
<td>58</td>
</tr>
<tr>
<td>;</td>
<td>%3B</td>
<td>59</td>
</tr>
<tr>
<td>&lt;</td>
<td>%3C</td>
<td>60</td>
</tr>
<tr>
<td>=</td>
<td>%3D</td>
<td>61</td>
</tr>
<tr>
<td>&gt;</td>
<td>%3E</td>
<td>62</td>
</tr>
<tr>
<td>?</td>
<td>%3F</td>
<td>63</td>
</tr>
<tr>
<td>@</td>
<td>%40</td>
<td>64</td>
</tr>
<tr>
<td>A</td>
<td>%41</td>
<td>65</td>
</tr>
<tr>
<td>B</td>
<td>%42</td>
<td>66</td>
</tr>
<tr>
<td>C</td>
<td>%43</td>
<td>67</td>
</tr>
<tr>
<td>D</td>
<td>%44</td>
<td>68</td>
</tr>
<tr>
<td>E</td>
<td>%45</td>
<td>69</td>
</tr>
<tr>
<td>F</td>
<td>%46</td>
<td>70</td>
</tr>
<tr>
<td>G</td>
<td>%47</td>
<td>71</td>
</tr>
<tr>
<td>H</td>
<td>%48</td>
<td>72</td>
</tr>
<tr>
<td>I</td>
<td>%49</td>
<td>73</td>
</tr>
<tr>
<td>J</td>
<td>%4A</td>
<td>74</td>
</tr>
<tr>
<td>K</td>
<td>%4B</td>
<td>75</td>
</tr>
<tr>
<td>L</td>
<td>%4C</td>
<td>76</td>
</tr>
<tr>
<td>M</td>
<td>%4D</td>
<td>77</td>
</tr>
<tr>
<td>N</td>
<td>%4E</td>
<td>78</td>
</tr>
<tr>
<td>O</td>
<td>%4F</td>
<td>79</td>
</tr>
<tr>
<td>P</td>
<td>%50</td>
<td>80</td>
</tr>
<tr>
<td>Q</td>
<td>%51</td>
<td>81</td>
</tr>
<tr>
<td>R</td>
<td>%52</td>
<td>82</td>
</tr>
<tr>
<td>S</td>
<td>%53</td>
<td>83</td>
</tr>
<tr>
<td>T</td>
<td>%54</td>
<td>84</td>
</tr>
<tr>
<td>U</td>
<td>%55</td>
<td>85</td>
</tr>
<tr>
<td>V</td>
<td>%56</td>
<td>86</td>
</tr>
<tr>
<td>W</td>
<td>%57</td>
<td>87</td>
</tr>
<tr>
<td>X</td>
<td>%58</td>
<td>88</td>
</tr>
<tr>
<td>Y</td>
<td>%59</td>
<td>89</td>
</tr>
<tr>
<td>Z</td>
<td>%5A</td>
<td>90</td>
</tr>
<tr>
<td>[</td>
<td>%5B</td>
<td>91</td>
</tr>
<tr>
<td>\</td>
<td>%5C</td>
<td>92</td>
</tr>
<tr>
<td>]</td>
<td>%5D</td>
<td>93</td>
</tr>
<tr>
<td>^</td>
<td>%5E</td>
<td>94</td>
</tr>
<tr>
<td>_</td>
<td>%5F</td>
<td>95</td>
</tr>
<tr>
<td>`</td>
<td>%60</td>
<td>96</td>
</tr>
<tr>
<td>a</td>
<td>%61</td>
<td>97</td>
</tr>
<tr>
<td>b</td>
<td>%62</td>
<td>98</td>
</tr>
<tr>
<td>c</td>
<td>%63</td>
<td>99</td>
</tr>
<tr>
<td>d</td>
<td>%64</td>
<td>100</td>
</tr>
<tr>
<td>e</td>
<td>%65</td>
<td>101</td>
</tr>
<tr>
<td>f</td>
<td>%66</td>
<td>102</td>
</tr>
<tr>
<td>g</td>
<td>%67</td>
<td>103</td>
</tr>
<tr>
<td>h</td>
<td>%68</td>
<td>104</td>
</tr>
<tr>
<td>i</td>
<td>%69</td>
<td>105</td>
</tr>
<tr>
<td>j</td>
<td>%6A</td>
<td>106</td>
</tr>
<tr>
<td>k</td>
<td>%6B</td>
<td>107</td>
</tr>
<tr>
<td>l</td>
<td>%6C</td>
<td>108</td>
</tr>
<tr>
<td>m</td>
<td>%6D</td>
<td>109</td>
</tr>
<tr>
<td>n</td>
<td>%6E</td>
<td>110</td>
</tr>
<tr>
<td>o</td>
<td>%6F</td>
<td>111</td>
</tr>
<tr>
<td>p</td>
<td>%70</td>
<td>112</td>
</tr>
<tr>
<td>q</td>
<td>%71</td>
<td>113</td>
</tr>
<tr>
<td>r</td>
<td>%72</td>
<td>114</td>
</tr>
<tr>
<td>s</td>
<td>%73</td>
<td>115</td>
</tr>
<tr>
<td>t</td>
<td>%74</td>
<td>116</td>
</tr>
<tr>
<td>u</td>
<td>%75</td>
<td>117</td>
</tr>
<tr>
<td>v</td>
<td>%76</td>
<td>118</td>
</tr>
<tr>
<td>w</td>
<td>%77</td>
<td>119</td>
</tr>
<tr>
<td>x</td>
<td>%78</td>
<td>120</td>
</tr>
<tr>
<td>y</td>
<td>%79</td>
<td>121</td>
</tr>
<tr>
<td>z</td>
<td>%7A</td>
<td>122</td>
</tr>
<tr>
<td>{</td>
<td>%7B</td>
<td>123</td>
</tr>
<tr>
<td>|</td>
<td>%7C</td>
<td>124</td>
</tr>
<tr>
<td>}</td>
<td>%7D</td>
<td>125</td>
</tr>
<tr>
<td>~</td>
<td>%7E</td>
<td>126</td>
</tr>
</tbody>
</table>
<p>-Aaron Gilbert</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/url-encoding-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Preformatted Word Wrapping?</title>
		<link>http://www.devtrends.com/index.php/wordpress-preformatted-word-wrapping/</link>
		<comments>http://www.devtrends.com/index.php/wordpress-preformatted-word-wrapping/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 04:55:34 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[PRE]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=249</guid>
		<description><![CDATA[For most of my posts I use the &#8220;Preformatted&#8221; style from the drop down menu in the Visual editor of WordPress. It works quite well for demonstrating sections of code or screen output. However, there is a problem with using Preformatted and that is the...]]></description>
			<content:encoded><![CDATA[<p>For most of my posts I use the &#8220;Preformatted&#8221; style from the drop down menu in the Visual editor of WordPress. It works quite well for demonstrating sections of code or screen output. However, there is a problem with using Preformatted and that is the issue with word wrapping.</p>
<p>Preformatted style in WordPress uses the &lt;pre&gt; HTML tag. The &lt;pre&gt; tag does not word wrap any of the sentences contained within, and if you are using a defined space for displaying the text, as with the theme on my WordPress, you may find that your examples are shortened. Fortunately there is a fix to this problem that requires some minor style tag modifications for the &lt;pre&gt; tags that seem to run off into the distance.</p>
<p>I found a blog post on techguy.org that helped me out&#8230;quickly to the point, add:</p>
<pre style="padding-left: 30px;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;">white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;</pre>
<p>to your &lt;pre style=&#8221;"&gt; tag and the text should wrap in most browsers.</p>
<p><a href="http://forums.techguy.org/web-design-development/249849-forcing-long-text-lines-wrap.html" target="_blank">http://forums.techguy.org/web-design-development/249849-forcing-long-text-lines-wrap.html</a></p>
<p>I&#8217;m out&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/wordpress-preformatted-word-wrapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
