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"> |
| 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> |