Information Box JavaScript:
Insert script between <head> tags </head> of html document
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more available at The JavaScript Source!!
-->
<!-- via the Internet U R L : http://www.compfund.com/javascript/
-->
<!--- Begin
var CurrentMsg = 'hello ';
function update(msg) {
var pad_str="";
n = msg.length;
if(n<39) {
pad = (40-n)/2;
for(var i=0; i<pad; i++) {
pad_str+=" ";
}
}
CurrentMsg = pad_str + msg;
document.messages.field.value = CurrentMsg;
clearTimeout(timer);
timer = setTimeout("idleMsg()",3000);
}
function MakeArray(n) {
this.length=n;
for(var i = 1; i<= n; i++) {
this[i] = "";
}
return(this);
}
var index = 1;
var notice_num = 10;
var notices = new MakeArray(notice_num);
notices[1] = "Welcome to the CARDCAT Information Box!";
notices[2] = "Check out our new online database list"
notices[3] = "It contains over 90 databases!!";
notices[4] = "Access Academic Press, FirstSearch,";
notices[5] = "Pro Quest Direct & Reference Center Gold";
notices[6] = "Access from both On Campus or OFF Campus";
notices[7] = ".........................................";
notices[8] = "Zahnow Library announces online help";
notices[9] = "via the web-based tutorials listed above";
notices[10] = "........................................";
var timer = setTimeout('idleMsg()',3000);
function nochange() {
document.messages.field.value = CurrentMsg;
}
function idleMsg() {
update(notices[index++]);
if(index>notice_num) {
index=1;
}
}
// End -->
</SCRIPT>
----------------------
Insert this code to launch script above. Place within <body> tags and at desired position </body> of html document.
<FORM name="messages" onSubmit="return false">
<img src="http:/screens/ccbksl.gif">
<input type="text" name="field" size="40" value="" onFocus="self.status='This
is a JavaScript info. field'; return true" onChange="nochange()">
<img src="http:/screens/ccbksr.gif">
</FORM>
--------------------------------------------------------------------------------------------------------------------------
Site Based Pop-up Window:
Insert script between <head> tags </head> of html document
<SCRIPT language="JavaScript">
<!-- created by Scott Mellendorf 7-98
function openmsg1()
{
OpenWindow=window.open("","erefwin2","height=130,width=495,toolbar=no,scrollbars=yes,menubar=yes");
OpenWindow.document.write("<html><title>LIBRARY LINGO</title>")
OpenWindow.document.write("<body bgcolor=#FFFFCC>")
OpenWindow.document.write("<b><center>LIBRARY LINGO</b></center>")
OpenWindow.document.write("<br>")
OpenWindow.document.write("<b>*What is a Web Based Library Catalog?</b><br>")
OpenWindow.document.write("<br>")
OpenWindow.document.write("<b>A catalog that uses an Internet-World Wide Web Browser.</b><br>")
OpenWindow.document.write("<b>i.e. Netscape Navigator/Microsoft Internet Explorer</b><br>")
OpenWindow.document.write("</body>")
OpenWindow.document.write("</html>")
OpenWindow.document.close()
self.name="main"
}
//-->
</SCRIPT>
----------------------
Insert this code to launch script above. Place
within <body> tags and at desired position </body> of html document.
This is an
example of a window being launched by a hypertext
link.
Cardcat is a web based library catalog <A HREF="" onClick="openmsg1()">(define
web based library catalog)</A>
----------------------------------------------------------------------------------------------------------------------------
URL Based Pop-up Window:
Insert script between <head> tags </head> of html document
<SCRIPT language="JavaScript">
// Copyright (c) 1996-1997 Athenia Associates.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.
function launch(newURL, newName, newFeatures, orgName) {
var remote = open(newURL, newName, newFeatures);
if (remote.opener == null)
remote.opener = window;
remote.opener.name = orgName;
return remote;
}
function launchRemote() {
myRemote = launch("http://library.svsu.edu/search/a", "myRemote",
"height=190,width=620,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=1,resizable=0,scrollbars=1,status=0,toolbar=0",
"myWindow");
}
// -->
</SCRIPT>
--------------------
Insert this code to launch script above. Place within <body> tags and at desired position </body> of html document. This example uses an image (author.gif) to launch the script.
<a name= "author"><a href="javascript:launchRemote()"><img src="http:/screens/author.gif" border=no alt="AUTHOR"></a><br>
--------------------------------------------------------------------------------------------------------------------------------