Examples of Scripting for HTML Pages

 

Script on how to make a window appear
somewhere in the middle of the screen. //BC

<SCRIPT LANGUAGE = "JavaScript">
var remote = null;
function remoteStart() {
remote = window.open('', 'My Little Window', 'width=275,height=225,resizable=1');
if (remote != null) {
if (remote.opener == null) {
remote.opener = self;
}
remote.location.href ="http://www.sc.edu";
}
}
</SCRIPT>
 

**Java Applet. Has a message scroll across the bottom of the web browser in the lower task bar.

<SCRIPT LANGUAGE="JavaScript">

<!-- Beginning of JavaScript Applet -------------------

function scrollit_r2l(seed)
{
var m1 = "Ice ice, Baby.....too cold too cold!!! ";
var m2 = "Ice ice, Baby.....the Black and Gold!! ";
var m3 = "The Black, the Black, the black. . . ";
var m4 = "and OLD GOLD . . . . ";
var msg=m1+m2+m3+m4;
var out = " ";
var c = 1;

if (seed > 100) {
seed--;
var cmd="scrollit_r2l(" + seed + ")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0) {
for (c=0 ; c < seed ; c++) {
out+=" ";
}
out+=msg;
seed--;
var cmd="scrollit_r2l(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0) {
if (-seed < msg.length) {
out+=msg.substring(-seed,msg.length);
seed--;
var cmd="scrollit_r2l(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,100);
}
else {
window.status=" ";
timerTwo=window.setTimeout("scrollit_r2l(100)",75);
}
}
}
// -- End of JavaScript code -------------- -->
</SCRIPT>

 

VB Script that shows the date and time on the webpage. ONLY WORKS IN INTERNET EXPLORER

<script language="VBScript">

<!--

'VBScript Time & Date

'Developed by JWalk & Associates (http://www.j-walk.com)

'Use freely

Document.Write "<TABLE BORDER=4><TD>"

Document.Write "<IFRAME NAME=ClockFrame SRC=empty.htm WIDTH=110 HEIGHT=22></IFRAME>"

Document.Write "</TD></TABLE>"

Sub Window_OnLoad()

Call UpdateTime

End Sub

Sub UpdateTime()

t=now()

H=Hour(t)

if H > 12 Then H=H-12

M=Minute(t)

If Len(M)=1 then M="0" & M

FriendlyTime= H & ":" & M & " " & Right(t,2)

Set OutFrame=Document.ClockFrame.Document

OutFrame.Write "<BODY TOPMARGIN=0 LEFTMARGIN=0 RIGHTMARGIN=0 BGCOLOR=Black Text=Lime><FONT FACE=Arial SIZE=2><B><CENTER>"

OutFrame.Write FriendlyTime & "<BR>"

OutFrame.Write "<FONT COLOR=Yellow>"

OutFrame.Write Month(Now) & "/" & Day(Now) & "/" & Year(now)

OutFrame.Close

x = SetTimeOut("UpdateTime",1000*60,"Vbscript")

End Sub

-->

</script>


Main Pictures 1906 Horoscopes BlackVoices.Com
USC Online Dir. Computer Science Japan(Navy) Yahoo Dancehall Charts
CGW CyberGold Tucows Onsale T&T Links
NavyFCU USAA Skee-Phi.Com E-Cards MakeMoney!!!