Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Tuesday, August 12, 2008

Import XML Document

Import XML Document
http://www.quirksmode.org/dom/importxml.html

Working with XML and Javascript
http://www.peachpit.com/articles/article.aspx?p=29307&seqNum=4

On this page I import an XML document and then read out the data and put them in a table on the page.

I think importing XML documents will become more and more important in the future. You can manage the XML document as a kind of database, while the HTML document contains all information about the displaying of the data.

Anyway, try it first by clicking the link and loading some crucial information about the Roman emperors of the Julian-Claudian dynasty. You can also view the XML document separately.

First I import the document emperors.xml, then I enter the XML document through the W3C DOM and extract the data I need, while building a table to display the data.

The script

function importXML()

{
if (document.implementation && document.implementation.createDocument)
{
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.onload = createTable;
}
else if (window.ActiveXObject)
{
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.onreadystatechange = function () {
if (xmlDoc.readyState == 4) createTable()
};
}
else
{
alert('Your browser can\'t handle this script');
return;
}
xmlDoc.load("emperors.xml");
}

function createTable()
{
var x = xmlDoc.getElementsByTagName('emperor');
var newEl = document.createElement('TABLE');
newEl.setAttribute('cellPadding',5);
var tmp = document.createElement('TBODY');
newEl.appendChild(tmp);
var row = document.createElement('TR');
for (j=0;j

Importing the XML

First of all I import the XML document and make it accessible through the object xmlDoc. When the document has finished loading, I want the script createTable() that construes the table to be executed immediately. Of course, the coding for all this is browser specific.

Clicking the link activates the function importXML.

function importXML()

{

Mozilla

Netscape imports an XML document through the method document.implementation.createDocument(). First check if document.implementation is supported, then check if document.implementation.createDocument() is supported. Explorer 5 on Mac also supports document.implementation, but not the createDocument method, so it shouldn't execute this script.

	if (document.implementation && document.implementation.createDocument)

{

Then create the document and give it an onLoad event handler: as soon as the document has been loaded the script createTable() is executed, creating the table:

		xmlDoc = document.implementation.createDocument("", "", null);

xmlDoc.onload = init;
}

Explorer

Explorer on Windows doesn't support document.implementation . Instead, you must create an Active X Object that will contain the XML document. So we see if the browser can create ActiveXObjects:

	else if (window.ActiveXObject)

{

If it does, we can proceed by creating the object

		xmlDoc = new ActiveXObject("Microsoft.XMLDOM");

Unfortunately there's no onLoad event for this object. To see if it's ready we should use the MS proprietary ReadyStateChange event. I don't quite understand all this myself, but it works. When the onReadyStateChange event handler fires, the readyState has a value between 1 and 4. 4 means that all data has been received (= onLoad). So if it's 4, start creating the table.

		xmlDoc.onreadystatechange = function () {

if (xmlDoc.readyState == 4) createTable()
};
}

Other browsers

If the browser supports neither way, give an alert and end everything:

	else

{
alert('Your browser can\'t handle this script');
return;
}

Load document

Finally, load the actual document. Surprisingly, the command for this is the same in both browsers:

	xmlDoc.load("emperors.xml");

}

Now we wait for the XML document to be loaded completely, then the function createTable() is started up.

Strangely, Mozilla sometimes only accepts a URL to the XML file that is relative to the page with the script, which in practice means that you can only access local XML files. Only the Linux version does accept absolute paths in all cases.

You might be able to solve the problem by putting the page containing the script on a real web server instead of a local host. However, this does not help in all cases.

Creating output

This function is entirely specific for the XML document I created. Each XML document is different, each way of displaying the content is different, so the function I wrote is only an example.

The XML document

The XML document consists of nodes named , which all contain the same children. As an example, this is the structure of the first node:

                                  

|
------------------------------------------
| | |

| | |
Augustus 27BC-14AD Peaceful

In the script below I assume that every emperor has this structure. If one hasn't, it could lead to huge problems, but this way I keep the script simple.

Creating the table

Function createTable() starts by creating an array of all the tags in the XML document. For each of these tags I want to create a TR containing several TD's with the data.

function createTable()

{
var x = xmlDoc.getElementsByTagName('emperor');

Then we create a new TABLE with CELLPADDING=5. Note the special spelling cellPadding, Explorer requires this and it doesn't hurt Netscape.

	var newEl = document.createElement('TABLE');

newEl.setAttribute('cellPadding',5);

Explorer requires that we also create a TBODY and append it to the table. Don't ask me why, I think TBODY is a completely useless tag, but without it the example doesn't work in Explorer.

	var tmp = document.createElement('TBODY');

newEl.appendChild(tmp);

First of all, a row with TH's for the headers. Create a TR

	var row = document.createElement('TR');

then go through the childNodes of the first emperor.

	for (j=0;j

A problem here: the XML document looks like this:

	


which means that Netscape considers the empty text node between emperor and name as the first child of emperor. Since these nodes are only a nuisance, we have to check if the nodeType of the childNode is 1 (= it's a tag). If it isn't, continue with the next child:

		if (x[0].childNodes[j].nodeType != 1) continue;

Create a container element (TH):

		var container = document.createElement('TH');

then read out the name of the childNode (ie. name, rule and death). I want these names to be printed inside the TH. So first I append the name to the TH, then I append the container to the TR

		var theData = document.createTextNode(x[0].childNodes[j].nodeName);

container.appendChild(theData);
row.appendChild(container);
}

Finally, append the row to the TBODY tag

	tmp.appendChild(row);

Then we go through all elements emperor and create a TR for each one

	for (i=0;i

Go through the childNodes of each emperor, check if it's a node (tag) and create a TD to hold the data

		for (j=0;j

Then extract the actual data. Remember that the text inside a tag is the nodeValue of the first childNode of that tag

			var theData = document.createTextNode(x[i].childNodes[j].firstChild.nodeValue);

Append the text to the TD and the TD to the TR

			container.appendChild(theData);

row.appendChild(container);
}

and when you've finished going through the emperor, append the TR to the TBODY

		tmp.appendChild(row);

}

Finally, when you've gone through each emperor, append the TABLE to the special P with ID="writeroot" I created:

	document.getElementById('writeroot').appendChild(newEl);

}

and a table has been magically created.

Sunday, July 20, 2008

Google Map API

1. documentation

http://code.google.com/intl/zh-CN/apis/maps/documentation/index.html

2. Some tutorial

http://dev.leck.com/gsupport/

http://www.developer.com/lang/jscript/article.php/3615681

Thursday, July 17, 2008

Web Development Resources

Good Joomla tutorials(****)
http://www.phpeveryday.com/index.php
fff
Joomla documentation (****)
http://docs.joomla.org/Main_Page

CSS resource
http://www.cssjuice.com/

1. CSS Menu and navigation bar (*****)

http://css.maxdesign.com.au/index.htm

2. Write header background with three images (left, middle, right)

http://www.pixy.cz/blogg/clanky/rubberheaders/

3. Create rounded corners with Joomla

http://docs.joomla.org/Creating_rounded_corners

4. 25 rounded corners with CSS (****)

http://www.cssjuice.com/25-rounded-corners-techniques-with-css/

5. javascript

http://mootools.net/

Wednesday, July 2, 2008

jdk5.0 tomcat5.0配置全攻略

最近刚转到java的学习,没想到环境配置整整搞了四天,汗!相信有不少像我这样的java初学者对环境的配置有所疑问,在网上找到的东西根本不完整,今天希望用这篇文章能够帮助java初学者走好第一步!

1.首先JDK(Java Development Kit)不用说了吧,既然你要学习java相信你已经知道它是干什么的了,在sun公司的网站就可以免费获得!

下载好JDK后,我们一步步的将他安装到我们的本地系统,比如安装到:C:\Program Files\Java目录下,然后就是配置环境变量了,我这里只介绍在Windows平台上的配置!步骤如下:

我的电脑---属性---高级---环境变量---[系统变量]---编辑->变量名[JAVA_HOME]---变量值[C:\Program Files\Java\jdk1.5.0_12]---确定;

编辑->变量名[CLASSPATH]---变量值[.;%JAVA_HOME%\lib\dt.jar,%JAVA_HOME%\lib\tools.jar]((前面的.号千万不要忘记,它代表当前目录))---确定;

找到系统变量中原有的[path]变量--编辑---在原有的值后加上---;%JAVA_HOME%\bin---确定;

好了JDK环境的配置已经大功告成了,接下来你就应该重新启动你的Computer了,因为系统变量在重启后才会生效。

现在该测试一下你的环境了!

用编辑工具在c:\下建立一个java程序:HelloWorld.java

public class HelloWorld

{ public static void main(String[ ] args)

{

System.out.println("HelloWorld!");

}

}

切记,程序名一定要与公有类的名字相同!保存文件后,--[开始]--运行---cmd---cd c:\(指向你保存文件的目录下)

java HelloWorld.java [回车]

javac HelloWorld [回车]

相信你已经看到输出为:HelloWorld!了,到此JDK环境我们已经配置起来了!

2.tomcat服务器的配置

tomcat也是一款免费软件,你可以到Apache网站上免费获取!

下载好tomcat后,安装,比如你安装的目录是D:\tomcat5.0 那么你还需要配置一下环境变量:电脑---属性---高级---环境变量---[系统变量]---编辑->变量名[CATALINA_BASE]--变量值[D:\tomcat5.0]确定;

电脑---属性---高级---环境变量---[系统变量]---编辑->变量名[CATALINA_HOME]---变量值[D:\tomcat5.0]---确定;

ok,tomcat的环境变量也好了(好象最新的tomcat版本不需要配置这个也可以)

打开浏览器----输入:http://localhost:8080/如果出现tomcat的欢迎页面,那么你的tomcat就已经安装成功了!

接下来,你还想做什么呢?我想你一定得知道它怎么去运行JSP\Servlet\JavaBean吧!

(1)jsp

在你的tomcat安装目录下,你可以找到D:\Tomcat 5.0\webapps\ROOT目录,那么这个目录就是系统默认的跟目录了,你先编写一个简单的JSP页面,放到这个目录下。jsp-one.jsp如下:

<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>




JSP注释


<% //利用For循环控制字体由大到小
for(int i=1;i<6;i++)><%=i%>>你好JSP<%=i%>>
<%} //利用for循环控制字体由小到大 for(int i=5;i>0;i--)
{
%><%=i%>>你好JSP<%=i%>>
<%} %>


保存后在浏览器中输入:http://localhost:8080/jsp-one.jsp你会看到什么呢?

如果你可以看到由大到小和由小到大的字体,那么你的jsp环境也就没问题了!

如果不是,请检查你的程序是不是在编码上有错误,比如你拷贝了上面的程序直接在[记事本]中保存,很有可能多出一些码!

XAMPP for Windows 简易教程

下载:
XAMPP Windows 1.5.4a
XAMPP Lite 1.5.4a (精简版)

有三种选择可供您下载 XAMPP 的 Windows 版:
安装包
简单且安全:XAMPP 的便捷安装程序。
ZIP 压缩包
给喜欢绿色软件的人:XAMPP 的普通 ZIP 压缩档案。
自解压 ZIP 包
便捷而高效:XAMPP 的超小自解压 7-ZIP 压缩档案。

安装:
方法 A:使用安装包进行安装
使用安装包来安装 XAMPP 是最简单的方法。

XAMPP win32 的安装向导

安装过程结束后,您会在 开始/程序/XAMPP 菜单下找到 XAMPP。您可以使用 XAMPP 控制面板来启动/停止所有服务或安装/卸载所有服务。

XAMPP 控制面板能启动/停止 Apache、MySQL、FilaZilla 和 Mercury,或直接将其安装为服务

方法 B:不使用安装包进行安装
如果不用安装包,则可下载 7-ZIP 压缩包或 ZIP 压缩包,并将其解压至您选择的文件夹中。


本图中,我们将 XAMPP 解压到“D:\program files”路径下的“D:\program files\xampp”文件夹中。之后,打开 XAMPP 所在的文件夹,并运行其中的“setup-xampp.bat”。


这样能使配置文件中的路径信息得到更新。


最后,通过那些批处理文件或图形界面的“xampp-control.exe”启用不同的服务即可。

注意:如果您使用的是 XAMPP 的安装包,您不需要运行“setup_xampp.bat”。

操作:
操作 1:启动/停止/测试 XAMPP
www.nat32.com 制作的 XAMPP 控制面板不包含在 Lite 版(精简版)中。

.\xampp\xampp-control.exe

其它的服务启动/停止脚本
启动 Apache 和 MySQL:.\xampp\xampp_start.exe
停止 Apache 和 MySQL:.\xampp\xampp_stop.exe
启动 Apache:.\xampp\apache_start.bat
停止 Apache:.\xampp\apache_stop.bat
启动 MySQL:.\xampp\mysql_start.bat
停止 MySQL:.\xampp\mysql_stop.bat
启动 Mercury 邮件服务器:.\xampp\mercury_start.bat
(Mercury 邮件服务器只能通过 XAMPP 控制面板的图形界面停止)
设置 FileZilla FTP 服务器:.\xampp\filezilla_setup.bat
启动 FileZilla FTP 服务器:.\xampp\filezilla_start.bat
停止 FileZilla FTP 服务器:.\xampp\filezilla_stop.bat

测试:Apache 服务启动后,在浏览器中输入地址
http://localhost 或http://127.0.0.1,并检测所有的 XAMPP 样例和工具。

操作 2:将特定的服务器配置为系统服务
您可以在 NT4、2000 和 XP 平台中将特定的服务器配置为系统服务。请使用以下脚本:

安装 Apache 服务器为系统服务:.\xampp\apache\apache_installservice.bat
卸载 Apache 服务器的系统服务:.\xampp\apache\apache_uninstallservice.bat
安装 MySQL 服务器为系统服务:.\xampp\mysql\mysql_installservice.bat
卸载 MySQL 服务器的系统服务:.\xampp\mysql\mysql_uninstallservice.bat
安装及卸载 FileZilla FTP 服务器为系统服务:.\xampp\filezilla_setup.bat
Mercury 邮件服务器:目前还不能配置为系统服务!

操作 3:安装插件
除了主程序包外,还有许多相关的插件可用于开发环境。目前,本站发布的官方 win32 插件如下:

1. 包含 Mod_Perl 和精选的重要 Perl 模块的 Perl 插件
2. Tomcat 插件(系统需求:系统中必须已经安装 SUN J2SE SDK)
3. Tomcat 插件的 Cocoon 模块(系统需求:系统中必须已经安装 Tomcat)
4. Python 插件

推荐的安装方法如下:
XAMPP 安装包需要安装包格式的插件,7-Zip 压缩包需要 7-Zip 压缩包格式的插件。ZIP 压缩包格式的插件请直接解压缩至 XAMPP 的主文件夹中。然后运行“setup_xampp.bat”批处理文件即可。安装包格式的插件能自动配置所有的东西,您不需要手动配置。

操作 4:升级 XAMPP
当 XAMPP 程序集里的单独组件被升级时,我们会将 XAMPP 同步升级。然而,其中一些组件的变化与我们最新发布的版本不兼容,所以我们就不会升级这类组件。我们通常能升级 XAMPP 中所有的服务器和程序。但我们不升级配置文件,因为您可能已经修改过他们了。提示:如果您用的是安装包版的 XAMPP,那么您在使用升级安装包的时候将非常轻松。其他用户请下载自解压 7-ZIP 压缩包。直接将其中的文件释放到 XAMPP 文件夹中,并覆盖原有的文件即可。

安全问题(必读!)
XAMPP 安全控制台
正如前面提到,XAMPP 并不是为生产环境准备的,它只为开发者服务。为了方便开发者,XAMPP 被默认配置为所有功能全部开启。对于开发环境来说,这是非常好的,但对于生产环境,这可能是灾难性的。

下面是 XAMPP 默认配置的安全问题列表:
1. MySQL 管理员(root)未设置密码。
2. MySQL 服务器可以通过网络访问。
3. PhpMyAdmin 可以通过网络访问。
4. 样例可以通过网络访问。
5. Mercury 邮件服务器和 FileZilla FTP 服务器的用户是公开的。

所以大家应该在发布一些在线的东西前保证 XAMPP 的安全性。有时候,一个防火墙或一个外部路由器就足够安全了。首先,您可以试试基于网络的“XAMPP 安全控制台”。

修正绝大多数的安全薄弱环节,只需访问以下地址(只能在本地计算机上访问):

1.4.15 版之前的版本:
http://127.0.0.1/xampp/xamppsecurity.php

1.4.15 版及以后版本:
http://127.0.0.1/security

MySQL、PhpMyAdmin 的管理员密码和 XAMPP 的目录保护可以在这里设置。对于 Mercury 邮件服务器和 FileZilla FTP 服务器,请记得更改配置设置(比如用户名和密码)。如果您不需要这些服务,那就不要启动它们——这样也是安全的。

卸载
移除方法 A:安装包
使用安装包(NSI)安装的 XAMPP,请使用自带的卸载工具进行卸载!自带的卸载工具会将注册表中的相关内容和一些服务一并卸载。自带的卸载工具如下图所示。


移除方法 B:zip 和 7-zip 压缩包
卸载方法根据您使用的 XAMPP 安装版本有所不同:
1. ZIP 压缩包
2. 自解压 7-ZIP 压缩包
3. XAMPP lite(精简版)

卸载时只需删除整个 XAMPP 文件夹即可。不涉及注册表项,不涉及环境变量……简单而又干净!但在此之前不要忘记关闭所有 XAMPP 组件的服务器,退出所有的面板。也许您已经安装了一些 XAMPP 的组件作为系统服务,那么您必须先卸载这些服务!

常见问题
问题 1:什么是 XAMPP Lite(精简版)?
XAMPP Lite(精简版)类似 XAMPP 推荐的 PHP 与 MySQL 快速使用包。与完整版相比,它少了一些工具,比如 Mercury 邮件服务器或 FileZila FTP 服务器。注意:精简版没有相关的安装包、插件或升级包。

问题 2:我的网络文档应该放在哪里?
所有网络文档都放在 htdocs 主文件夹中(.\xampp\htdocs)。如果您将 test.html 文件放在这里,您可以通过
http://localhost/test.html 来访问它。php 或 cgi 文件也同样放在这里。其他的 WWW 子文件夹可以在 htdocs 目录下创建。例如将 test.html 放在 .\xampp\htdocs\new 路径下,您就可以在浏览器的地址栏中输入http://localhost/new/test.html 来访问这个文件。

更多的文件特性概述:
CGI) 可执行:全部;允许的结尾:.cgi => 主程序包
PHP) 可执行:全部;允许的结尾:.php .php4 .php3 .phtml => 主程序包
MOD Perl) 可执行:.\xampp\htdocs\modperl;允许的结尾:.pl => Perl 插件
ASP Perl) 可执行:.\xampp\htdocs\modperlasp;允许的结尾:.asp => Perl 插件
JSP Java) 可执行:.\xampp\tomcat\webapps\java(和其他);允许的结尾:.jsp => Tomcat 插件
Servlets Java) 可执行:.\xampp\tomcat\webapps\java(和其他);允许的结尾:.html(和其他)=> Tomcat 插件
MOD Python) 可执行:.\xampp\htdocs\python;允许的结尾:.py => Python 插件
Spyce Python) 可执行:.\xampp\htdocs\python;允许的结尾:.spy => Python 插件

问题 3:我能移动 XAMPP 吗?
可以,但只限于 ZIP/7-ZIP 压缩包版的 XAMPP。移动操作之后,您必须运行“setup-xampp”使配置文件得到更新。请不要用这种方法尝试安装版的 XAMPP。如果您在使用安装版的 XAMPP,您可以将其复制(而不是移动)一份,并放到新的路径下,然后运行“setup-xampp”使配置文件得到更新。试试吧!

问题 4:我如何配置默认的开始页面?
如果您在浏览器中访问类似
http://localhost/xampp/ 的文件夹,Apache 服务器会自动返回一个默认的开始页面。Apache 会自动寻找已存在的类似 index.php 的索引页。httpd.conf 中的“DirectoryIndex”指令负责这个功能。在这里您可以定义默认开始页面的名字和协议。XAMPP 在默认状态下,“DirectoryIndex”指令的列表如下:

index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.html.var index.phtml

问题 5:我如何在 PHP5 和 PHP4 之间相互切换?
XAMPP(非精简版!)包含 PHP5 和 PHP4。请使用“php-switch.bat”($path-to-xampp\xampp\php-switch.bat)来切换版本。注意:在切换版本前请先停止 Apache 服务器。

问题 6:我在哪里能更改配置文件?
您可以通过文本编辑器来更改 XAMPP 的各种配置文件。这些文件存在于以下路径:
Apache 基本配置:.\xampp\apache\conf\httpd.conf
Apache SSL:.\xampp\apache\conf\ssl.conf
Apache Perl(仅限插件):.\xampp\apache\conf\perl.conf
Apache Tomcat(仅限插件):.\xampp\apache\conf\java.conf
Apache Python(仅限插件):.\xampp\apache\conf\python.conf
PHP:.\xampp\apache\conf\php.ini(Apache 正在运行的 PHP 版本)
MySQL:.\xampp\mysql\bin\my.cnf
phpMyAdmin:.\xampp\phpMyAdmin\config.inc.php
FileZilla FTP 服务器:.\xampp\FileZillaFTP\FileZilla Server.xml
Mercury 邮件服务器基本配置:.\xampp\MercuryMail\MERCURY.INI
Sendmail:.\xampp\sendmail\sendmail.ini

问题 7:这些文件夹里都是些什么东西?
路径 内容
\xampp\anonymous 匿名 FTP 的样例文件夹
\xampp\apache Apache 服务器
\xampp\cgi-bin 可执行的 CGI 脚本
\xampp\FileZillaFTP FileZilla FTP 服务器
\xampp\htdocs http 文档的主文件夹
\xampp\install 用于 XAMPP 的安装(请勿删除!)
\xampp\licenses 同上
\xampp\MercuryMail Mercury 邮件 SMTP POP3 IMAP 服务器
\xampp\mysql MySQL 服务器
\xampp\perl Perl
\xampp\php PHP(4 和 5)
\xampp\phpmyadmin phpMyAdmin
\xampp\security 额外的安全配置
\xampp\tmp 临时文件夹
\xampp\webalizer Webalizer 网络状态
\xampp\webdav WebDAV 样例

Windows下Tomcat的安装

1. 下载Tomcat for windows的安装程序,http://tomcat.apache.org/ , 我选择下载的Windows Executable和tar.gz 文件
2. 直接运行Windows Executable 包中解压出来的exe文件,可以选择full安装或者custom安装
3. 安装完成之后,会发现在任务栏多出一个类似Apache的图标,接下来还要进行一些配置才能使Tomcat 工作
4. 再次打开系统变量对话框,点击我的电脑->属性->高级->环境变量,在系统变量中查找Path变量,并在末尾添加Tomcat的安装路径,我这里是E:\phpserver\Tomcat 5.0。另外在添加两个变量:
TOMCAT_HOME=” E:\phpserver\Tomcat 5.0”
JAVA_HOME=”C:\Program Files\JAVA\jdk1.5”
5. 配置完环境变量以后要重新启动,配置才能生效
6. 重启之后,先启动Tomcat服务,可以直接点任务栏的图标,启动服务;也可以通过命令行E:\phpserver\tomcat 5.0\bin\startup来启动。
7. 打开ie,输入http://localhost:8080/index.jsp,如果页面显示出Tomcat的标志和一些说明文字,表示配置成功了

Friday, May 30, 2008

Dragging and dropping to order items in Javascript

[1]http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/

[2]http://www.stillnetstudios.com/2006/12/31/drag-and-drop-sort-order-with-scriptaculous/

[3]http://tool-man.org/examples/index.html

Sunday, May 11, 2008

IE Automation & Tabs

A comment to one of my other posts asked about how to launch IE and open several additional tabs.

IE7 does not support specifying multiple URLs on the command line, but another way to do this is to use IE Automation to launch IE as an out-of-proc COM server and then call methods such as IWebBrowser2::Navigate2. While you can do this using C++ or any language that supports COM, the easiest is to use Windows Scripting Host.

First, create a 'lanuchie.js' file using your favorite text editor, add the following, and save:

var navOpenInBackgroundTab = 0x1000;
var oIE = new ActiveXObject("InternetExplorer.Application");
oIE.Navigate2("http://blogs.msdn.com");
oIE.Navigate2("http://blogs.msdn.com/tonyschr", navOpenInBackgroundTab);
oIE.Navigate2("http://blogs.msdn.com/oldnewthing", navOpenInBackgroundTab);
oIE.Navigate2("http://blogs.msdn.com/ericlippert", navOpenInBackgroundTab);
oIE.Visible = true;
Now from the command line you can do:

wscript.exe launchie.js
to open IE, navigate the first tab, and then open three background tabs.

One caveat: due to some IE features such as Protected Mode you will sometimes observe that the links are opened in an existing IE window.

Published Friday, January 19, 2007 10:51 AM by tonyschr

Wednesday, November 14, 2007

Great Web Applications

  • Snapshot

https://account.snap.com/signup.php?source=pub-5821628-www.livejournal.com&campaign=bsblogo