internet.com

Go to WebDeveloper Home


hm-v6-139x61.gif

Database Journal: The Knowledge Center for Database Professionals

find a web host with:
CGI Access
DB Support
NT Servers
UNIX Servers
Telnet Access

advanced search
jobs

Get FREE Development Info via your Email!

The Webdeveloper channel
FlashKit
GIF.com
HiermenusCentral
webdeveloper Jobs
Java Boutique
JavaScript.com
JavaScript Source
ScriptSearch
StreamingMedia World
WDJ
WDVL
WebDeveloper.com
WebReference.com
XMLFiles.com

internet.com
Internet News
Internet Investing
Internet Technology
Windows Internet Tech.
Linux/Open Source
Web Developer
ECommerce/Marketing
ISP Resources
ASP Resources
Wireless Internet
Downloads
Internet Resources
Internet Lists
International
EarthWeb
Career Resources

Search internet.com
Advertise
Corporate Info
Newsletters
E-mail Offers

internet.commerce
Be a Commerce Partner










R E V I E W S
WebDeveloper.com

Software Review:
NetObjects' ScriptBuilder, Part 2

By Scott Clark

A Script inside saves time.

One such example is a small browser detection function that is included in the Script Library. You insert the code within your script by clicking on the Script Library icon on the toolbar, and selecting the code you wish to insert. Then you click "Insert" and the code is on your page. The function can then be used to write browser-specific code so that the page is displayed properly by each browser, i.e.
function DetermineCurrentBrowser() {
	var current_browser = ""; 
	var bwr = navigator.appName; 
	var ver = parseInt(navigator.appVersion, 10); 
	
	if ( bwr == "Netscape" && ver == 4 )
	current_browser = "Netscape 4.0"; 
	else if ( bwr == "Netscape" && ver == 3 )
	current_browser = "Netscape 3.0";  
	else if ( bwr == "Netscape" && ver == 2 )
	current_browser = "Netscape 2.0"; 
	else if ( bwr == "Microsoft Internet Explorer"
	&& ver == 3 )
	current_browser = "MSIE 3.0"; 
	else if ( bwr == "Microsoft Internet Explorer"
	&& ver == 4 )
	current_browser = "MSIE 4.0"; 
	else current_browser = "Other";
	
	return current_browser;
} // end DetermineCurrentBrowser

if ( current_browser == "Netscape4.0")
   document.write('You are using Netscape Navigator 4.0');
Since ScriptBuilder allows me to insert my own snippets of code, I could potentially add the code directly below "end DetermineCurrentBrowser" to the Script Library. Another handy feature is the Script Inspector, which enables you to determine which browsers will support your page's features. The tool also features extensive Search and Replace functions, taking much of the pain out of script editing.

[Move on to the last part of the article]

Fast Jump to Anywhere on WebDeveloper.com®:


Contact the WebDeveloper.com® staff

Last modified: 20

 

Refresh Daily
Join Editor-in-Chief David Fiedler The Editor With No Time and find truth, justice, and a clue or two.


Browse by Category
[ Site Map ]

ActiveX / VBscript
Animated GIF Archive
Browsers
CGI / Perl
Database Connectivity
Design / Graphics
E-Commerce
HTML-Advanced: DHTML, CSS
HTML / Site Authoring Tools
Intranet/Groupware
Java
JavaScript
Multimedia: Audio / Video / Streaming Technologies
Opinions
Refresh Daily: Editorial Column
Security
Servers & Server Tools
Site Design / Graphics
Site Management / Marketing / Log File Analysis
Tutorials
VRML / 3D
XML