<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Lisa Wollin</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/lisawoll/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/lisawoll/feed.xml</link>
    <description />
    <lastBuildDate>Mon, 06 Apr 2015 23:51:44 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Update</title>
      <link>https://docs.microsoft.com/archive/blogs/lisawoll/update</link>
      <pubDate>Tue, 24 Jan 2006 14:07:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/lisawoll/2006/01/24/update/</guid>
      <description><![CDATA[It's been a long time since I posted.&nbsp; There are many reasons for this, but mostly, I'm not...]]></description>
      <content:encoded><![CDATA[<P>It's been a long time since I posted.&nbsp; There are many reasons for this, but mostly, I'm not working with FrontPage anymore.&nbsp; For the next release of FrontPage, there are a lot of changes happening.&nbsp; One of the largest is a stronger focus on SharePoint and SharePoint site design and development and less focus on Web development. You can read more about the changes to FrontPage for the next version in <a href="http://blogs.msdn.com/rmauceri">Rob Mauceri's blog</A>. I haven't been working with FrontPage nearly as long as Rob, but I have worked with several other Web development apps, and the changes that they made to the FrontPage code this time around are, in a word, incredible. Rob explains what these features are, so I won't go into detail. Please look at his blog for more information</P>
<P>However, as a result of these changes, they didn't really need me anymore. Since I write about code and developer stuff and not so much about design or UI stuff, so I've gone back to working on Word for the time being. As a result, I won't be posting anymore about FrontPage (thus the name change), but I won't be posting about Word either, so this won't become a Word programming blog. (I actually think there are plenty of those, <a href="http://blogs.msdn.com/brian_jones/">Brian Jones blog</A> being the predominant one for Office 12 changes.) I'll just write about the things that interest me. The next time I post something I've been doing lately.</P>]]></content:encoded>
    </item>
    <item>
      <title>Online JavaScript Calculator</title>
      <link>https://docs.microsoft.com/archive/blogs/lisawoll/online-javascript-calculator</link>
      <pubDate>Fri, 12 Aug 2005 16:35:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/lisawoll/2005/08/12/online-javascript-calculator/</guid>
      <description><![CDATA[There are many online calculators. You've probably seen, and perhaps used, 
several. Some calculate...]]></description>
      <content:encoded><![CDATA[<p>There are many online calculators. You've probably seen, and perhaps used, 
several. Some calculate mortgage payments, others calculate costs, and even more 
calculate goofy things, like the number of days, hours, minutes, and seconds since you were born.</p>
<p>Here's a calculator that calculates ... well ... anything. It's a 
Windows-like calculator that's similar to the one you have in your wallet 
that lets you calculate how much money you have left in your checking account 
after you write a check.</p>
<p>Here's a picture. <br>
<img src="http://www.wollinweb.com/blogimages/calculator.gif"></p>
<p>When you use this calculator with the <strong>ShowModalDialog</strong> method (explained in greater detail in my blog post
<a href="http://blogs.msdn.com/lisawoll/archive/2004/07/06/174509.aspx">Open a 
page in a new window of a specific size</a>), you can return a calculated value 
to the calling page. Here's how it works: you provide a link to the calculator 
from a Web page that references a JavaScript function that uses the <strong>
ShowModalDialog</strong> method; then when a user closes the calculator, the total is returned to 
the first page through the JavaScript function that called the <b>
ShowModalDialog</b> method.&nbsp; It's really much more simple than it sounds.</p>
<p><b>Here's some of the code</b></p>
<p>In the <a href="http://www.wollinweb.com/blogimages/calcExample.htm" target="_blank">example 
page</a>, the &quot;Calculate Numbers&quot; link, code shown below, references a 
JavaScript function named OpenCalculator.</p>
<p><code>&lt;a href=&quot;javascript:OpenCalculator();&quot;&gt;Calculate Numbers&lt;/a&gt;</code></p>

<p>The OpenCalculator function, shown in the following code, does a few 
different things: it displays the calculator, returns a value from the 
calculator, and places the returned value into a &lt;span&gt; tag.</p>
<p><code>function OpenCalculator()<br />
{<br />
&nbsp;
var ret;<br />&nbsp; var spanTag;<br /><br />
&nbsp;
ret 
= window.showModalDialog(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&quot;calculator.htm&quot;, &quot;&quot;, <br />
&nbsp;&nbsp;&nbsp;&nbsp;&quot;dialogHeight:285px;<br />
&nbsp;&nbsp;&nbsp;&nbsp;dialogWidth:215px;<br />
&nbsp;&nbsp;&nbsp;&nbsp;resizable:yes;&quot;);<br /><br />
&nbsp;
spanTag = document.all.tags<br />
&nbsp; &nbsp;&nbsp;(&quot;span&quot;).item(&quot;numbers&quot;);<br />
&nbsp;
spanTag.innerText = ret;<br />}</code></p>
<p>The calculator has several functions, too many to show here, and three global variables. The global  
variables 
store the numbers and operators that the calculator needs to calculate the 
values. The variable named <code>total</code> stores the current number that is being 
calculated. When a user clicks the equals button, total resets to zero. The 
variable named <code>op</code> stores the operator so that when the user clicks the plus 
button, the calculator knows to add the numbers. The last variable, named <code>isNew</code>, 
is a Boolean that indicates whether to reset the calculation to zero.</p>
<p>Each of the buttons in the calculator calls a JavaScript function: the number 
buttons call the SetNumber function, the operator buttons call the SetOperator 
function, and the equals button calls the SetTotal function. Each of these 
functions serves a very specific purpose, but the function that does all the 
work is the Calculate function, shown in the following code. The Calculate 
function takes the current operator (the operator button clicked last) and 
calculates the last number entered (or the value in the number textbox) and places the 
calculated value into the <code>total</code> variable.</p>
<pre><code>function Calculate()
{
  var num = parseInt(document.Calculator.numbers.value);
  
  switch(op)
  {
    case &quot;plus&quot;:
    {
      total += num;
      break;
    }
    case &quot;minus&quot;:
    {
      total -= num;
      break;
    }
    case &quot;multiply&quot;:
    {
      total *= num;
      break;
    }
    case &quot;divide&quot;:
    {
      total /= num;
      break;
    }
    default:
    {
      break;
    } 
  }
  
  document.Calculator.numbers.value = total;
}</code></pre>
<p>For an example of the calculator and the full code, see the <a href="http://www.wollinweb.com/blogimages/calcExample.htm">example 
page</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Blog Comments</title>
      <link>https://docs.microsoft.com/archive/blogs/lisawoll/blog-comments</link>
      <pubDate>Tue, 19 Jul 2005 19:41:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/lisawoll/2005/07/19/blog-comments/</guid>
      <description><![CDATA[I usually always try to respond to comments to my blog, but lately, we've had some disconnects with...]]></description>
      <content:encoded><![CDATA[<P>I usually always try to respond to comments to my blog, but lately, we've had some disconnects with comments being sent in email, so I thought I would respond to a few recent comments. If I've missed your comment, please forgive me and feel free to send me mail using the Contact link in my blog.</P>
<P><B>Comment from Jason:</B></P>
<P>"Do you guys purposely markup your pages to render incorrectly in every browser other than IE?</P>
<BLOCKQUOTE>
<P>Jason, I'm not sure if you're talking about the <A href="http://msdn.microsoft.com/frontpage" target=_blank>FrontPage dev portal</A> on MSDN or <A href="blogs.msdn.com/lisawoll" target=_blank>my blog</A>, but I assure you that it isn't intentional. Both the blog tool and MSDN have their own ways of marking up HTML, which are very different from each other and which I haven't yet quite figured out.</P>
<P>I just tried both MSDN and my blog in Firefox, and the blog looked fine, but sure 'nuf MSDN looked pretty bad. Unfortunately, I can't do much about this, so please don't dis our content because IMHO we have some pretty great content.</P></BLOCKQUOTE>
<P><B>Comment from <A href="http://nfocentrale.net/orcmid/blog/">orcmid</A>:</B></P>
<P>"Please screen the most-active newsgroup discussions before you feature them. After reading the thread about multiple body tags, I am very wary of ever asking a question that one of those MVPs might want to tell me is stupid.</P>
<P>"No one ever did bother to ask what DAWG found valuable about being able to have multiple body tags (regardless of the fact that FrontPage is not designed to allow it), assuming that there was an alternative solution without checking with him what he really wanted to do. The resulting incivility was unpleasant to watch."</P>
<BLOCKQUOTE>
<P>First, newsgroup posts are included using a Web component. I'm not sure exactly how this is determined, but I believe it is based on how many responses there are to a post, so I have no direct control over which posts get "featured."</P>
<P>Second, no one should ever be treated rudely in any of the newsgroups. The newsgroups are moderated by MVPs and other users who volunteer time to respond to customers. Although we have no control over what general users say, we do have some control over how MVPs treat customers.&nbsp; I'll forward your comment to the MVP lead, who I'm sure will follow up appropriately with the MVPs. If you ever see any user being abused, called names, or generally treated like an idiot in any of the newsgroups, feel free to contact me, and I'll follow up with the MVP lead.</P>
<P>Finally, I wanted to address DAWG's issue about using multiple BODY elements in the same document. The HTML schema doesn't allow for multiple BODY elements, so it's not surprising that FrontPage doesn't support it. However, I can think of a couple reasons why someone might want to use multiple BODY elements. </P>
<P>In documentation, there is something called single-sourcing. It allows people to create one file that can be used in multiple places. For example, you might have some files that you want included in a book as well as in a compiled help file. If this is what DAWG wanted to do, his best choice would be XML.</P>
<P>Old-timers often associate XML with literal data, as you might find in a database, but XML has many more uses, and single-sourcing is one of them. XML allows you to create a custom schema that you can use to markup content. </P>
<P>With XML, you can markup the content in a file and specify where different portions of the content get published. As in the case I cited earlier, say you have help files that you want published to a compiled help file as well as in a book.&nbsp; Another case where you might want to do single sourcing is where some content gets published to a Web site, some content is included in a marketing flyer, and some content is compiled into a brochure. These are only a few instances where XML is the ideal markup language, and I have no doubt that many of you can think of many more possible scenarios where a single file might be published in multiple formats.</P>
<P>Although XTHML is similar to XML in the sense that the XHTML schema generally encourages that the formatting be kept separate from the HTML, it isn't XML. It's really just an HTML schema that enforces certain style restrictions. True XML uses a custom schema that contains custom markup tags. You use XSLTs to "transform" the appearance of the content in XML files, but XSLTs do more than just change the appearance of the text, for example making some text bold and other text underlined.</P>
<P>XSLT allows you to convert an XML file from one format, or XML schema, to another. For example, you can use an XSLT to compile XML files into a Word document, or you can use XSLT, to convert files into HTML format. You can even use XSLT to convert from one XML schema to another XML schema.</P>
<P>The second reason that I can think of is for browser compatibility.&nbsp; For example, perhaps DAWG wanted to put in multiple BODY elements with the idea that only the BODY element for the client browser would be visible. This seems to me to be the least likely of the two reasons that I can think of. </P>
<P>Ideally, all Web pages should be cross-browser compliant (MSDN pages not withstanding!), but in the case where you need to develop different HTML pages for different browsers (or connection speeds), you could have a script that determines the browser on load and serves up the correct page for that browser. I'm sure there are several scripts available on the Internet, in fact, I believe FrontPage 2003 includes a behavior for just this purpose, but I'll provide a simple script in a future post for those who are interested in knowing how to do this.</P></BLOCKQUOTE>
<P>Thanks, everyone, for your comments. As I said, as much as possible I like to respond to comments and usually do so in email when an email address is provided. Keep the comments coming!</P>
<P>Until next time, happy surfing!</P>]]></content:encoded>
    </item>
    <item>
      <title>Working with Access databases that live outside of a Web site</title>
      <link>https://docs.microsoft.com/archive/blogs/lisawoll/working-with-access-databases-that-live-outside-of-a-web-site</link>
      <pubDate>Tue, 19 Jul 2005 19:40:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/lisawoll/2005/07/19/working-with-access-databases-that-live-outside-of-a-web-site/</guid>
      <description><![CDATA[We had a customer recently, who needed to access an Access database from both a classic ASP page and...]]></description>
      <content:encoded><![CDATA[<P>We had a customer recently, who needed to access an Access database from both a classic ASP page and from another Access database. To prevent the database from being locked by IIS, the customer wanted to know if they could move the database out of the Web site directory. By default, FrontPage expects the database to be in the Web site. However, when they did this, it seemed to break FrontPage’s ability to work with the database connection as Front Page.</P>
<P>Bernardo Iturriaga Dubost, one of the FrontPage testers, came to the rescue of this customer. Here's his response:</P>
<P>The main reason that FrontPage stores the .mdb files in the web is so that you don’t need to access to the Web server to access the data in a database. However, you can provide dual access to a database by using a system DSN, and then using the DSN in FrontPage to connect to the database. Here's how:</P>
<P>First, you need to create a system DSN on the Web server that hosts the Web site:</P>
<OL>
<LI>From the <B>Start Menu</B>, click <B>All Programs</B>. 
<LI>Select <B>Administrative Tools</B>, and click <B>Data Sources (ODBC)</B>. 
<LI>Go to the <B>System DSN</B> tab. 
<LI>Click <B>Add</B>. 
<LI>Select the appropriate driver type (for example, MS access driver). 
<LI>Click <B>Finish</B>. 
<LI>Provide a name and a description for the DSN. 
<LI>Click <B>Select</B> the navigate to the actual .mdb file located in another folder on the server. 
<LI>Click <B>Ok</B> when you're finish selecting the database. 
<LI>In most cases this is enough, but if the database requires a password, you'll need to provide one. To do this, click <B>Advanced</B> and provide the password. 
<LI>Click <B>Ok</B> again to create the DSN. </LI></OL>
<P>After you're finished, you'll see your new named DSN listed on the <B>System DSN</B> tab of the <B>ODBC Data Source Administrator</B>.</P>
<P>Next, you need tell FrontPage to use the DSN to connect to the database.</P>
<OL>
<LI>Start FrontPage and open the Web site. 
<LI>From the <B>Tools</B> menu, click <B>Site Settings</B>. 
<LI>On the <B>Database</B> tab, click <B>Add</B>. 
<LI>In the dialog select <B>System Data source on web server</B>. 
<LI>Click <B>Browse</B>. FrontPage displays a list of system DSN on the Web server. 
<LI>The connection that you created in the previous steps should be there, select it and click <B>Ok</B>. 
<LI>Click <B>Ok</B> to the <B>Site Settings</B> dialog box, this will add the connection string to the global.asa file in the Web site. 
<LI>You can now use this connection to the database for database features in FrontPage for both ASP and ASP.NET. </LI></OL>
<P>Please note that in order to do this, you need to have access to the actual server that hosts the Web site. One benefit of this configuration is that you can have different permissions for the Web site and for the folder that contains the .mdb file. Please also note that for the users to get data when they browse, MACHINENAME_IUSR needs to have the appropriate read/write access permissions to the .mdb file; otherwise there will be an error. </P>]]></content:encoded>
    </item>
    <item>
      <title>JavaScript 101: Working with Events</title>
      <link>https://docs.microsoft.com/archive/blogs/lisawoll/javascript-101-working-with-events</link>
      <pubDate>Wed, 13 Jul 2005 18:50:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/lisawoll/2005/07/13/javascript-101-working-with-events/</guid>
      <description><![CDATA[It has been awhile since my last JavaScript 101 post. I apologize. I have a 
very lame excuse: I've...]]></description>
      <content:encoded><![CDATA[<p>It has been awhile since my last JavaScript 101 post. I apologize. I have a 
very lame excuse: I've been busy. But I'm back with the next installment: working 
with events.</p>
<p>Most JavaScript events are relatively simple and easy to use. For example, 
clicking on a button, an element, or a page. There are some more complex events 
that deal with data, but to keep this simple, I'll talk only about the ones that 
affect user interaction, such as onclick, onmouseover, onmouseout, and onfocus. 
There are, of course, many more events than this, but these four events seem 
to cover a majority of the uses that you will need ... at least to start with.</p>
<p><b>The Script</b></p>
<p>First, of course, you need a script, so here's a simple little script.&nbsp; 
All it does is display a message box.&nbsp; Just copy the code below, including 
the opening and closing &lt;script&gt; tags, and paste them into the HEAD section of a 
Web page.</p>
<pre>&lt;script language=&quot;javascript&quot;&gt;
function ShowMessage(text)
{
    window.alert(text);
}
&lt;/script&gt;</pre>
<p>In order to call a script from an event, it must be inside a function, so the 
above script contains a function called &quot;ShowMessage&quot; that takes one argument, 
the text to be displayed.</p>
<p><b>Note</b>&nbsp;&nbsp;&nbsp;As I mentioned in 
<a href="http://blogs.msdn.com/lisawoll/archive/2005/05/23/421105.aspx" target="_blank">my last 
JavaScript 101 post</a>, you can use IntelliSense in Code view in 
FrontPage to write your scripts.</p>
<p><b>The HTML</b></p>

<p>Second, you need to reference the function from an event inside of an 
element. I'll use a P element. Here's the 
HTML code that you need.</p>

<pre><code>&lt;p&gt;Here is a sample paragraph 
with an event.&lt;/p&gt;</code></pre>
<p><b>Putting Them Both Together</b></p>

<p>Next, add to the P element a an event handler that calls the function.&nbsp; You can add it to 
any event, such as the onload event, but to make things simple, add it to the 
onclick event.&nbsp; Here's the code:</p>

<pre><code>onclick=&quot;ShowMessage
('A little JavaScript fun!');&quot;</code></pre>

<p>Your P element should now look like the following code:</p>

<pre><code>&lt;p oncl&shy;ick=&quot;ShowMessage
('A little JavaScript fun!');&quot;&gt;
Here is a sample paragraph with 
an event.&lt;/p&gt;</code></pre>

<p>And that's it.&nbsp; Save your page and display it in the browser.&nbsp; 
When you click on the text in the paragraph, the browser displays a message like 
the one in the following image.</p>
<p><img src="http://www.wollinweb.com/blogimages/js101events.gif"></p>
<p><b>What You've Learned</b></p>

<p>In this post you learned how to hook up a JavaScript function with an event 
handler for an HTML element. Now that you understand how to hook your scripts up 
to events to create user interaction, we can move onto writing more scripts.&nbsp; 
Next time, I'll talk about working with text—things like changing the text or HTML in an element, 
changing colors, formatting, etc. Until then, have fun!</p>]]></content:encoded>
    </item>
    <item>
      <title>New FrontPage Developer Portal ... Sort Of</title>
      <link>https://docs.microsoft.com/archive/blogs/lisawoll/new-frontpage-developer-portal-sort-of</link>
      <pubDate>Fri, 24 Jun 2005 19:23:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/lisawoll/2005/06/24/new-frontpage-developer-portal-sort-of/</guid>
      <description><![CDATA[During the past several months (about eighteen, to be exact!), we've been working to redesign the...]]></description>
      <content:encoded><![CDATA[<P>During the past several months (about eighteen, to be exact!), we've been working to redesign the <A href="http://msdn.microsoft.com/frontpage" target=_blank>FrontPage Developer Portal</A> on MSDN. If you've ever designed (or redesigned) a Web site, you understand the challenges that can arise. After several starts and stops, a great deal of research, and many discussions with stakeholders across Microsoft, I'm really excited to finally be taking the newly redesigned portal live.</P>
<P>This redesign encompasses some fairly large changes.</P>
<P><STRONG>Portal Home Page</STRONG></P>
<P>If you visited the FrontPage Developer Portal prior to our redesign, you may have used links on the portal home page to navigate through the other pages within the portal. We removed the links from the main part of the home page and inserted content from and links to other important information, such as FrontPage blogs and popular newsgroup posts.</P>
<P>Another major addition to the home page is the profile section. In the profile section, we'll introduce you to FrontPage product team members and MVPs. They are people who develop or support FrontPage. Some of the names may be familiar because you may have seen them in the newsgroups; others may be new to you because they generally work behind the scenes. However, all of them are important to FrontPage users as they work daily to build a better product.</P>
<P><STRONG>Navigating the Portal</STRONG></P>
<P>Because we removed the navigation links from the home page, you might be wondering how you can access the pages within the portal. To navigate the portal, you can use the right navigation bar. The right navigation was always there, but we’ve enhanced it to make it even more useful. It lives on each page in the portal, so you can always get to any page in the portal from any other page. This feature makes navigating the pages simple and easy.</P>
<P><STRONG>Getting Started</STRONG></P>
<P>The Getting Started page was one of the highest hit pages in our portal, so we redesigned it to really help you get started. It explains the three main pillars around which FrontPage 2003 was developed and provides links to help content, product information, developer articles, and other Web sites where you can find more information.</P>
<P><STRONG>Technical Articles</STRONG></P>
<P>The Technical Articles page previously listed all technical articles under two main headings: Web development and extending FrontPage. Now the articles are organized according to technologies, so if you want information relating to JavaScript, CSS, or VBA, you can easily find just the articles that you want without having to navigate a huge list of articles on every possible subject except the one in which you are most interested.</P>
<P><STRONG>Information Center</STRONG></P>
<P>In our research, we found that our customers often wanted information that didn't necessarily belong in an article. But if the information didn't belong in an article, where did it belong? Enter the Information Center. The Information Center comprises pages that explain various Web technologies that Web developers often use as well as tasks that they want to perform.</P>
<P>The Information Center is probably the area of the redesign about which I'm most excited. Each of the pages in the Information Center covers a major technology or a specific task. For example, if you want information on cascading style sheets, you can go to the CSS information page to find general information, a list of articles in the MSDN library, and other resources and Web sites that contain more information on CSS.</P>
<P>Initially, we included the Web technologies that are most common for our users: CSS, JavaScript, ASP, ASP.NET, and databases; and we included one major task: e-commerce. We plan to add additional pages in the future.</P>
<P>You can get to all the pages in the Information Center from the right navigation bar. In addition, there are links to many of the Information Center pages from the technical articles page.</P>
<P><STRONG>How Can You Help?</STRONG></P>
<P>We redesigned the FrontPage developer portal for you. We looked at which pages received the highest hits; we determined where you were going from the portal; and deduced (based on search and metrics) what information you wanted most.</P>
<P>You can help us by telling us how we're doing and what we can do to improve. We've added ratings to several of the portal pages to help you tell us what you think. As we receive actionable feedback, we'll make changes and continue to evolve the FrontPage developer portal.</P>
<P>We have one goal in mind: make the FrontPage developer portal the place you go to find information relevant to what you do—develop Web sites with FrontPage.</P>]]></content:encoded>
    </item>
    <item>
      <title>Password Protecting Web Pages</title>
      <link>https://docs.microsoft.com/archive/blogs/lisawoll/password-protecting-web-pages</link>
      <pubDate>Fri, 24 Jun 2005 18:56:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/lisawoll/2005/06/24/password-protecting-web-pages/</guid>
      <description><![CDATA[John Jansen, one of the FrontPage testers, sent me these three different ways to password protect...]]></description>
      <content:encoded><![CDATA[<P>John Jansen, one of the FrontPage testers, sent me these three different ways to password protect pages in FrontPage.</P>
<P><A href="#gui">Using a FrontPage site template and ASP</A><BR><A href="#snippets">Using Code Snippets</A><BR><A href="#aspnet">Using ASP.NET</A></P>
<P><A name=gui></A><STRONG>To password protect pages using a FrontPage site template and ASP</STRONG></P>
<P>Here are specific steps to password protect pages using features built into FrontPage:</P>
<OL>
<LI>From the <STRONG>File</STRONG> menu, click <STRONG>New</STRONG>. 
<LI>From the <STRONG>Web Site</STRONG> tab, select <STRONG>FrontPage Server Templates</STRONG> from the first list, and then select <STRONG>Database Interface Wizard</STRONG> from the second list. 
<LI>Type the location where you want to put your password protected page. This must be an Windows Web server running IIS. 
<LI>Click <STRONG>OK</STRONG>. 
<LI>In the Wizard… 
<OL>
<LI>Click <B>Next</B> to create an ASP solution. 
<LI>Click <B>Next</B> to use the default name for the connection. 
<LI>Click <B>Next</B> to use the default columns in the table. 
<LI>Click <B>Next</B> after the DB is created. 
<LI>Click <B>Next</B> to use the default table. 
<LI>Check the box to use a Database Editor. 
<LI>Click <B>Next</B>. 
<LI>Choose a password and enter it. 
<LI>Click <B>Next</B>. 
<LI>Click <B>Finish</B>. </LI></OL>
<LI>After FrontPage finishes building the site, all of the necessary code for password protecting pages has been generated. In order to protect any new pages, simply put the following code:<BR><PRE><CODE>&lt;!-- #include file=”login.asa” --&gt;
&lt;%
If Session(SiteId) &lt;&gt; true Then
Response.Redirect(“login.asp?requester=&lt;!--insert page name here--&gt;”)
End If
%&gt;</CODE></PRE>above the <CODE>&lt;HTML&gt;</CODE> tag on any page and save as .asp. </LI></OL>
<P><A name=snippets></A><STRONG>To password protect pages using Code Snippets</STRONG></P>
<P>Here are steps to create password protected pages using code snippets:</P>
<OL>
<LI>Create a new site in FrontPage. 
<LI>Create a new page and switch to Code view. 
<LI>Delete all the code in the new page. 
<LI>Paste the following code as a code snippet.<PRE>&lt;%
Username="user"
Password="pass"
' if any of the variables do not match, create error message
if Request.Form("login") &lt;&gt; Username or Request.Form("password") &lt;&gt; Password then
    MsgErr = "&lt;h3&gt;Authorization Failed.&lt;/h3&gt;"
    Response.Write MsgErr
    ' if correct, set the session variable and proceed
Else
    Session("someStringValue") = true
    ' redirect
    If Len(Request("requester")) &gt; 0 Then
        Response.Redirect (Request("requester"))
    Else
        Response.Redirect "protected.asp"
    End if
End if
%&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Results -- Login&lt;/title&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1252"&gt;
    &lt;meta name="GENERATOR" content="Microsoft FrontPage 6.0"&gt;
    &lt;meta name="ProgId" content="FrontPage.Editor.Document"&gt;
&lt;/head&gt;

&lt;body bgcolor="#FFFFFF"&gt;
    &lt;FORM ACTION="login.asp" METHOD="post"&gt;
    &lt;h3&gt;Login&lt;/h3&gt;
        &lt;TABLE BORDER=0&gt; 
            &lt;TR&gt;
                &lt;TD ALIGN="right"&gt;User name:&lt;/TD&gt;
                &lt;TD&gt;&lt;INPUT TYPE="text" NAME="login" size="10" VALUE=''/&gt;&lt;/TD&gt;
            &lt;/TR&gt;
            &lt;TR&gt;
                &lt;TD ALIGN="right"&gt;Password:&lt;/TD&gt;
                &lt;TD&gt;&lt;INPUT TYPE="password" NAME="password" size="10" VALUE=''/&gt;&lt;/TD&gt;
            &lt;/TR&gt;
            &lt;TR&gt;
                &lt;TD&gt;&lt;input TYPE="hidden" NAME="requester" VALUE="&lt;%=Server.HtmlEncode(Request("requester"))%&gt;"&gt;&lt;/TD&gt;
                &lt;TD&gt;&lt;/TD&gt;
            &lt;/TR&gt;
            &lt;TR&gt;
                &lt;TD align="left"&gt;&lt;INPUT TYPE="submit" VALUE="Login"/&gt;&lt;/TD&gt;
                &lt;TD&gt;&lt;/TD&gt;
            &lt;/TR&gt;
        &lt;/TABLE&gt;
    &lt;/FORM&gt;
&lt;/body&gt;
&lt;/html&gt;</PRE>
<LI>Save page as login.asp. 
<LI>Create a new page and switch to Code view (or do this with any page you want to protect with a password). 
<LI>Above the opening &lt;html&gt; tag, paste in the following snippet. <PRE><CODE>&lt;%
If Session("someStringValue") &lt;&gt; true Then
    Response.Redirect("Login.asp?requester=protected.asp")
End If
%&gt;</CODE></PRE>
<LI>Save this page as protected.asp (or replace the requester text above from protected.asp to the page name you are protecting). 
<LI>Browse to protected.asp. </LI></OL>
<P><A name=aspnet></A><STRONG>To password protect pages using ASP.NET</STRONG></P>
<P>Here are steps to password protect pages using ASP.NET:</P>
<OL>
<LI>Create a new page in your Web site and switch to code view. 
<LI>Select and delete all the code in the page. 
<LI>Paste in the following code. <PRE><CODE>&lt;html&gt;
&lt;body&gt;
    &lt;h1&gt;Please Log In&lt;/h1&gt;
    &lt;hr&gt;
    &lt;form runat="server"&gt;
    &lt;table cellpadding="8"&gt;
        &lt;tr&gt;
            &lt;td&gt;User Name:&lt;/td&gt;
            &lt;td&gt;&lt;asp:TextBox ID="UserName" RunAt="server" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Password:&lt;/td&gt;
            &lt;td&gt;&lt;asp:TextBox ID="Password" TextMode="password" RunAt="server" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;asp:Button Text="Log In" OnClick="OnLogIn" RunAt="server" /&gt;&lt;/td&gt;
            &lt;td&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/form&gt;
    &lt;hr&gt;
    &lt;h3&gt;&lt;asp:Label ID="Output" RunAt="server" /&gt;&lt;/h3&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    &lt;script language="C#" runat="server"&gt;
        void OnLogIn (Object sender, EventArgs e)
        {
            if (FormsAuthentication.Authenticate (UserName.Text, Password.Text))
                FormsAuthentication.RedirectFromLoginPage (UserName.Text, false);
            else
                Output.Text = "Invalid login";
        }
    &lt;/script&gt;</CODE></PRE>
<LI>Save the page as loginpage.aspx. 
<LI>Create a new page and switch to code view. 
<LI>Select and delete the code in the page. 
<LI>Paste the following code into the new page. <PRE><CODE>&lt;configuration&gt;
    &lt;system.web&gt;
        &lt;authentication mode="Forms"&gt;
        &lt;forms loginUrl="LoginPage.aspx"&gt;
        &lt;credentials passwordFormat="Clear"&gt;
    &lt;user name="Bruce" password="Batman"/&gt;
    &lt;/credentials&gt;
    &lt;/forms&gt;
    &lt;/authentication&gt;
    &lt;authorization&gt;
    &lt;deny users="?" /&gt;
    &lt;/authorization&gt;
    &lt;/system.web&gt;
&lt;/configuration&gt;</CODE></PRE>
<LI>Save the page as web.config. </LI></OL>
<P>And that’s all there is to that. Any aspx pages in the same folder as the web.config file are protected.</P>]]></content:encoded>
    </item>
    <item>
      <title>JavaScript 101: Writing Your First Script</title>
      <link>https://docs.microsoft.com/archive/blogs/lisawoll/javascript-101-writing-your-first-script</link>
      <pubDate>Mon, 23 May 2005 16:15:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/lisawoll/2005/05/23/javascript-101-writing-your-first-script/</guid>
      <description><![CDATA[You can arm yourself with all the background information that you want, but the easiest way to learn...]]></description>
      <content:encoded><![CDATA[<P>You can arm yourself with all the background information that you want, but the easiest way to learn JavaScript is to just jump in and start writing code. So let's start with something simple for your first script.</P>
<P>The window object contains all the other objects in the DOM, plus properties, methods, and events for the browser window. A common task that people want to do is specify the text for the status bar. Here's a simple bit of code that does this.</P><CODE>window.status = "This is a sample for changing the text on the status bar."</CODE> 
<P>This example is very simple, but simple is a great way to start.</P>
<P>Now that you have the code, what do you do with it? This is a great beginner question. There are two ways to insert JavaScript code into your pages. (1) You can insert raw JavaScript code into a &lt;script&gt; tag in the HEAD section of a page. (2) You can place the code in a function and put the function in a &lt;script&gt; tag in the HEAD section of a page, and then add an event handler to call the function.</P>
<P><B>(1) insert raw JavaScript code</B></P>
<P>For now, let's stick with the simplicity of the first option. Use the following steps to add this code to a page.</P>
<OL>
<LI>Start a new page in FrontPage and switch to Code view. (You can also use the code window in Split view.) 
<LI>In Code view, locate the closing &lt;/head&gt; tag. (If you don't know HTML, there's never been a better time to learn. Check out the <A href="http://office.microsoft.com/en-us/training/CR061832701033.aspx">HTML tutorials</A> on Office Online and <A href="http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnarhtmau/html/beghtml.asp">HTML for Beginners</A> on MSDN.) 
<LI>Press Enter a couple times and position the Insertion Point (cursor) on one of the blank lines. 
<LI>Copy the following code and paste it into FrontPage at the Insertion Point.<BR><CODE>&lt;script language="javascript"&gt;<BR>window.status = "This is a sample for changing the text on the status bar."<BR>&lt;/script&gt;</CODE> 
<LI>Save the page and preview it in a browser. Your page should look just like the following image (status bar text is circled in red to make it easy to locate). </LI></OL>
<BLOCKQUOTE><IMG src="http://www.wollinweb.com/blogimages/statusbar.gif"></BLOCKQUOTE>
<P>The second way to insert a script (i.e., place the code a function and put the function in a &lt;script&gt; tag in the HEAD section of a page, and then add an event handler to call the function.) requires a bit more work, so let's split it up into three separate tasks</P>
<P><B>(2) place the code in a function</B></P>
<P>Put simply, a function is a section of code that runs separately from code around it. Essentially, functions are methods that you create yourself to perform some action or series of actions. Some functions return values; other functions require values passed into them. The values that functions return are called return values; values passed into functions are called arguments.</P>
<P>The structure, or syntax, of a function is always the same: the function keyword identifies that what follows is a function, the text that follows the function keyword identifies the name of the function, the name of the function is followed by opening and closing parentheses (which may or may not contain arguments), and the code that applies to the function appears inside of opening and closing curly braces.</P>
<P>Here's a simple diagram of the syntax of a function:</P>
<P><IMG src="http://www.wollinweb.com/blogimages/function.gif"></P>
<P>For those of you who prefer to cut and paste, here's a code version of the above.</P><PRE><CODE>function scriptName()
{
    //Code goes here
}</CODE></PRE>
<P>Using the example above, your function might look something like the following code.</P><PRE><CODE>&lt;script language="javascript"&gt;
    function changeStatus() 
    { 
        window.status = "This is a sample for changing the text on the status bar."
    }
&lt;/script&gt;</CODE></PRE>
<P>When you place JavaScript code in functions, you can call the functions from event handlers. Event handlers execute code based on certain events that occur within the browser. I'll talk more about events and event handlers in my next post; for now, I want to show you how IntelliSense in FrontPage can help you write scripts.</P>
<P><B>Using IntelliSense in FrontPage</B></P>
<P>IntelliSense provides cues to options (or in this case objects, methods, properties, and events) that may be available. Let's go back to the code that we used earlier and create this again in FrontPage (without cutting and pasting the code).</P>
<P><B>Using IntelliSense to insert HTML Elements</B></P>
<OL>
<LI>To begin, start FrontPage and start a new page. 
<LI>Switch to Code view. 
<LI>Position the Insertion Point (cursor) before the closing &lt;/head&gt; tag and press Enter a few times. 
<LI>Move the Insertion Point up a couple lines and type "&lt;s". As you type, a drop-down box, as shown in the following image, displays showing a list of elements that can be placed within the HEAD section of a Web page.<BR><IMG src="http://www.wollinweb.com/blogimages/intellisense.gif"><BR>As you type, the highlighted element moves to "script"; at this point you can press the spacebar (or Enter or Tab) to insert the element into your Web page. 
<LI>After you press the spacebar, you see a list of attributes that apply to the SCRIPT element. Type "langu"; again, as you type, the highlighted attribute changes from <B>lang</B> to <B>language</B>. (We need the <B>language</B> attribute to identify that we are using JavaScript.) 
<LI>When the <B>language</B> attribute is highlighted, type an equals sign (=) and a double quote ("). 
<LI>Now you see a list of possible values for the <B>language</B> attribute. Type "j", and the highlighted value moves to "javascript". 
<LI>Type a closing double quote (") and a closing angled bracket (&gt;). FrontPage automatically inserts the closing &lt;/script&gt; tag. 
<LI>You should now have the following code in your Web page:<BR><CODE>&lt;script language="javascript"&gt;&lt;/script&gt;</CODE> </LI></OL>
<P>When you use IntelliSense to insert HTML elements, FrontPage places the Insertion Point between the opening and closing tags. You can then type text or, in this case, code between the tags.</P>
<P><B>Using IntelliSense to write JavaScript code</B></P>
<P>Now that you have an opening and closing script tag, you can write your script code. </P>
<OL>
<LI>With the Insertion Point between the opening and closing &lt;script&gt; tags, press enter a couple times. Arrow up once so that your Insertion Point is on the line that is between the line that contains the opening script tag and the line that contains the closing script tag. 
<LI>Type "window."; don't forget the period after the window. Once you press ".", FrontPage shows a drop-down list that contains all the properties, methods, and events related to the window object, as shown in the following image.<BR><IMG src="http://www.wollinweb.com/blogimages/intellisense2.gif"> 
<LI>Type "st" and then press Tab. FrontPage inserts "status" into your script. Now your script should read: <CODE>window.status</CODE> 
<LI>Press the space bar and type an opening quote. 
<LI>Type "This text displays on the browser's status bar.", and then type a closing quote. </LI></OL>
<P>The only thing to understand about using IntelliSense for writing scripts is that IntelliSense doesn't work when you are working with variables because FrontPage doesn't know which object a variable represents. I'll tell you more about declaring and working with variables a bit later. For now, try using IntelliSense to insert your own simple scripts. Here are a few to get you started:</P>
<UL>
<LI><CODE>window.alert("here's a message");</CODE> 
<LI><CODE>window.resizeTo(640,480);</CODE> 
<LI><CODE>window.moveTo(0,0);</CODE> </LI></UL>
<P>
<P>These are just a few simple scripts; in a future post, I'll help you understand how to write your own more complex scripts.</P>
<P>Here's what you learned today:</P>
<UL>
<LI>Woohoo! You wrote your first scripts. 
<LI>You learned how to use IntelliSense in FrontPage. 
<LI>You learned how to create a JavaScript function. </LI></UL>
<P>In my next post, I'll tell you more about events and how to connect a JavaScript function to an event on a Web page. For now, have fun.</P>]]></content:encoded>
    </item>
    <item>
      <title>IE User Agent</title>
      <link>https://docs.microsoft.com/archive/blogs/lisawoll/ie-user-agent</link>
      <pubDate>Wed, 04 May 2005 15:59:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/lisawoll/2005/05/04/ie-user-agent/</guid>
      <description><![CDATA[I apologize for not posting much lately. I have the next installment of JavaScript 101 almost ready...]]></description>
      <content:encoded><![CDATA[<P>I apologize for not posting much lately. I have the next installment of JavaScript 101 almost ready and will post it as soon as I have a chance to finish it. I've been hard at work writing the doc plan for the next version of FrontPage. No, I can't share what's planned (for articles or features), but I will eventually. Please be patient.</P>
<P>In the meantime, I wanted to share with you the <a href="http://blogs.msdn.com/ie">IE blog</A>. If you haven't seen the IE blog, you might want to keep an eye on it. There's an interesting post about the <a href="http://blogs.msdn.com/ie/archive/2005/04/27/412813.aspx">Internet Explorer 7 User Agent String</A> that might be important to Web developers who have code that sniffs out the client browser. As explained in this post, you may need to make a change to your code to be compatible with newer versions of IE.</P>]]></content:encoded>
    </item>
    <item>
      <title>JavaScript 101: The JavaScript Object Model</title>
      <link>https://docs.microsoft.com/archive/blogs/lisawoll/javascript-101-the-javascript-object-model</link>
      <pubDate>Wed, 06 Apr 2005 00:41:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/lisawoll/2005/04/06/javascript-101-the-javascript-object-model/</guid>
      <description><![CDATA[If you talk to several different Web developers, each will probably see the JavaScript object...]]></description>
      <content:encoded><![CDATA[<FONT face=verdana>
<P>If you talk to several different Web developers, each will probably see the JavaScript object model differently. To make it easiest, I'm going to split the JavaScript object model into two separate entities. One is the DOM, or Document Object Model, and the other is "everything else."</P>
<P><B>The DOM</B></P>
<P>Let's first start with the DOM. The DOM, also sometimes called the DHTML object model, is generally used to create dynamic HTML (DHTML). The DOM is made up of objects and members (by "members" I mean methods, properties, and events) that allow you to change the appearance of a Web page by using code. A drop-down menu is an example of using scripting with the DOM to manipulate the visible state of a DIV element. The following image shows the core objects in the DOM.</P>
<P><IMG src="http://www.wollinweb.com/blogimages/jsdom.gif"></P>
<P>Periodically, I'll refer back to this image as I break down the different objects of the DOM. For now, just notice the hierarchical structure of the DOM.</P>
<P>Different browsers implement the DOM differently. For example, an object that you can access in one browser may not be available in another browser. The above diagram includes only core objects and not custom objects that are included only in one or a few browsers. For example, the Layer object only works in Netscape Navigator, and possibly Mozilla and Firefox by association, and not in Internet Explorer. By the same token, Internet Explorer may implement its own custom objects that are unavailable in non-Microsoft browsers. For this reason, if you want your scripts to run in all possible browsers, you should stick with the core objects and not use custom objects, which may make programming scripts easier but will cause problems for your users.</P>Scripting against objects or using methods, properties or events that are not implemented in all browsers causes a run-time scripting error, like the one shown in the following image, when displaying a page in a browser in which the object or member is not available.<BR><BR><IMG src="http://www.wollinweb.com/blogimages/jserror.gif"> <BR><BR>You have probably seen similar error messages. Sometimes, the cause is that there is an error in the code, but most often, the programmer scripted against an object or member that isn't available in your browser. 
<P><B>Everything Else</B></P>
<P>Next, the "everything else" that I mentioned.&nbsp; Everything else includes objects to handle strings, numbers, and boolean values as well as mathematical functions and arrays. I generally consider these less "objects" and more as language conventions and built-in functions, but I'll explain that a bit later. For now, I'd like to focus on working with the DOM since those are the objects that most client-side JavaScript uses (although you can use the math functions to calculate numbers, which you might get from a Web form, but that's a subject that deserves its own post, so for now forget I mentioned it).</P>
<P><B>Working with the DOM</B></P>
<P>As I already said, the objects in the DOM are the objects that you would generally use to animate Web pages using client-side scripting. The main top-level object is the window object. All other objects are what are called "child" objects of this object because they exist as "children" of this object. This can be easier to understand if you think of the above diagram like a family tree. The window is the top-level "parent" object with "child" objects named document, event, history, location, navigator, and screen. The document object is a "child" object that is also a "parent" object because it has "child" objects, as does the form object.</P>
<P>The relationship between parent and child objects in an object model give the objects a structure that you can easily navigate, and understanding this structure helps you determine how to access child objects, which makes editing and writing scripts easier. You can work with most child objects of the window object directly without accessing them from the window object. </P>
<P>When you access individual objects within this hierarchical structure, you need to separate each object (and/or member) with a period (.). For example, the following code accesses the BODY element of the document object that is a child of the window object.</P><PRE><CODE>window.document.body</CODE></PRE>
<P>However, as I mentioned above, the document object is one of the child objects of the window object that you can access without first accessing the window object. So this code could also be written as shown in the following code.</P><PRE><CODE>document.body</CODE></PRE>
<BLOCKQUOTE>
<P><B>Note</B>&nbsp;&nbsp;&nbsp;You may have noticed that there isn't a body object in the object hierarchy shown in the image. This is correct. You'll also notice that I said that the code accesses the BODY "element" not the body object. The <CODE>body</CODE> in the above code is an accessor property that returns an element object. (If you've forgotten what an accessor property is, see my previous post <a href="http://blogs.msdn.com/lisawoll/archive/2005/03/23/400837.aspx" target=_blank>JavaScript and OOP</A>.) </P>
<P>All HTML elements (with the exception of the elements that have specific objects in the object model, like the STYLE and FORM elements) use the element object. However, not all elements have properties that you can use to access them directly. (In fact, most do not.) The BODY element just happens to be one of the few that does. I'll explain in a future post how to access all the other elements.</P></BLOCKQUOTE>
<P>Whew! This was a lot of general, overview-type stuff to take in in one sitting, and you might be thinking what on earth you're going to do with all of it. Well, I don't expect it to gel completely just yet, but soon it will all make sense and you'll be writing your own scripts like a pro.</P>
<P>For now, here's what you learned today about JavaScript:</P>
<UL>
<LI>JavaScript has objects that you can use to animate Web pages (DOM) as well as objects that you can use to calculate numbers, handle strings, and work with arrays ("everything else"). 
<LI>The DOM contains objects that you can use to access features in a browser and elements in a Web page. 
<LI>You use the DOM objects to create dynamic HTML pages. 
<LI>The DOM has a hierarchical structure that is similar to a family tree and is made up of "parent" and "child" objects. 
<LI>Understanding the hierarchical structure of the DOM helps you know how to access the appropriate child objects and makes writing scripts easier. 
<LI>In script, you need to separate objects in the hierarchical structure with a period (.). </LI></UL>
<P>In my next post, we'll write a few simple scripts and I'll show you how IntelliSense in FrontPage can help you write your scripts.</P></FONT>]]></content:encoded>
    </item>
  </channel>
</rss>