Jumat, 02 Januari 2026

ContextMenu on IE

 




' AddCtxMenuIE.vbs

' Adds a custom item to all the IE50 context menus 

' -----------------------------------------------------------------------


rc = MsgBox("Would you like to add a new item to all the IE50 context menus?", vbYesNo)

if rc=vbNo Then WScript.Quit


' The registry path where to add our new entries. 

' If your registry doesn't contain a Shell node, it'll be silently created

REG_HKCU_IE50_BASE = "HKCU\Software\Microsoft\Internet Explorer\MenuExt"


' Adds a new key (the name of the item) 

REG_HKCU_IE50_ITEM = REG_HKCU_IE50_BASE & "\Dudi Gunawan...\"


' Creates the required values

Set shell = WScript.CreateObject("WScript.Shell")

shell.RegWrite REG_HKCU_IE50_ITEM, _

               "D:\Articles\Microsoft Internet Developer\Customize IE50\Source\myItem.htm", _

               "REG_SZ"


Form Validation

 




<html>

 

<head>

<title>Personal Information</title>

<style> 

PRE {font-family:Times New Roman; color:navy}

H3 {text-align:center; color:navy}

</style>

<script language="JavaScript" src="validation.js"></script>

<script language="JavaScript"> 

 

function frmPersonalSubmit() {

if (document.all.txtAddressOne.value.Trim()=='') {

document.all.txtAddressOne.value = document.all.txtAddressTwo.value;

document.all.txtAddressTwo.value = '';

}

if (!validation.nonBlank(document.all.txtFullName))

return false;

if (!validation.validDate(document.all.txtDoB))

return false;

if (!validation.validHours(document.all.txtHours))

return false;

if (!validation.nonBlank(document.all.txtAddressOne))

return false;

if (!validation.nonBlank(document.all.txtCity))

return false;

if (!validation.itemSelected(document.all.txtState))

return false;

if (!validation.validZip(document.all.txtZip))

return false;

if (!validation.validSSNbr(document.all.txtSSNbr))

return false;

if (!validation.validEmail(document.all.txtEmail))

return false;

}

</script>

</head>

 

<body>

 

<h3>Personal Information</h3>

 

<form method="POST" onsubmit="return frmPersonalSubmit();" name="frmPersonal"

action="personalupdate.asp">

  <pre><label for="txtFullName">Full Name </label><input type="text" name="txtFullName"

id="txtFullName" size="50" tabindex="1">

<label for="txtDoB">Date of Birth </label><input

type="text" name="txtDoB" id="txtDoB" size="12" tabindex="2"></pre>

  <pre><label for="txtHours">Std Work Hours </label><input type="text" name="txtHours"

id="txtHours" size="6" tabindex="3" value="40"></pre>

  <pre><label for="txtAddressOne">Address Line 1 </label><input type="text"

name="txtAddressOne" id="txtAddressOne" size="50" tabindex="4">

<label for="txtAddressTwo">Address Line 2 </label><input

type="text" name="txtAddressTwo" id="txtAddressTwo" size="50" tabindex="5">

<label

for="txtCity">City </label><input type="text" name="txtCity" id="txtCity" size="30"

tabindex="6">

<label for="txtState">State </label><select name="txtState" id="txtState"

size="1" tabindex="7"><option value="(State)">(State)</option><option value="CO">Colorado</option><option

value="MD">Maryland</option><option value="VA">Virginia</option><option value="WA">Washington</option></select>

<label

for="txtZip">Zip Code </label><input type="text" name="txtZip" id="txtZip" size="12"

tabindex="8"></pre>

  <pre><label for="txtSSNbr">SS Number </label><input type="text" name="txtSSNbr"

id="txtSSNbr" size="15" tabindex="9"></pre>

  <pre><label for="txtEmail">Email Address </label><input type="text" name="txtEmail"

size="50" id="txtEmail" tabindex="10"></pre>

  <p><input type="submit" value="Submit" name="cmdSubmit"><input type="reset" value="Reset"

  name="cmdReset"></p>

</form>

</body>

<script language="JavaScript"> 

// Define the display names for the form fields and default values

document.all.txtFullName.setAttribute("DisplayName","Full Name");

document.all.txtDoB.setAttribute("DisplayName","Date of Birth");

document.all.txtHours.setAttribute("DisplayName","Standard Work Hours");

document.all.txtAddressOne.setAttribute("DisplayName","First Address Line");

document.all.txtCity.setAttribute("DisplayName","City");

document.all.txtState.setAttribute("DisplayName","State");

document.all.txtZip.setAttribute("DisplayName","Zip Code");

document.all.txtSSNbr.setAttribute("DisplayName","Social Security Number");

document.all.txtEmail.setAttribute("DisplayName","Email Address");

</script>

 

</html>


Kamis, 01 Januari 2026

VBScript

 <center>

<p>

<input type="BUTTON" value="Click me" name="BtnHello">



<script language="VBScript">

<!--

Sub BtnHello_OnClick

MsgBox "Hello World!", 0, "My first active document"

End Sub

-->

</script>

============================

<SCRIPT LANGUAGE="VBScript">
	' This line executes when the script tag is parsed.
	Call PrintWelcome

	Sub PrintWelcome
		Dim h

		h = Hour(Now)
		If h < 12 then 
			Document.Write "Good morning!  "
		ElseIf h < 17 then 
			Document.Write "Good afternoon!  "
		Else 
			Document.Write "Good evening!  "
		End If
		Document.Write "Welcome to the world of VBScript.  "
		Document.Write "Just in case you were wondering, it's "
		Document.Write Time() & " on " & Date() & "."
	End Sub
</SCRIPT>
====================

 

 <div id="idTransDiv" style="position:relative; top:0; left:0; height:0; width:69;

  filter:revealTrans(duration=3.0, transition=0);">

  <h4 id="idHead" style="position:relative; visibility:visible; margin-


bottom:0;">Samples:&nbsp;Mouse&nbsp;Tracking</h4>

</div>

<p>


<font size="5">

<table border="0"><tr valign="MIDDLE"><td>

<a id="Image"> <img 


src="/web/20010616083652im_/http://msdn.microsoft.com/scripting/vbscript/sampl


es/mouset/msn-home.jpg" alt="" width="590" height="224" 


border="0"></a></td></tr>

<tr><td>&nbsp;</td></tr>

<tr valign="MIDDLE"><td valign="MIDDLE" align="CENTER"><font 


size="5"><input type="text" name="TxtLinkDescription" 


size="50"></font></td></tr></table>

</font>


<script language="VBScript">

<!-- 

Dim mX, mY


If ie4= true then

sub Image_onMouseMove()

y = window.event.offsetY

mY = y

x = window.event.offsetX

mX = x


If InRect(x, y,  5, 30, 120, 85) Then 

Call DescribeLink("The Microsoft Product 


Catalog")


ElseIf InRect(x, y,  5, 95, 120, 135) then 

Call DescribeLink("Microsoft's product support 


options")


ElseIf InRect(x, y,  5, 150, 120, 190) then 

Call DescribeLink("Download free Microsoft 


software")

ElseIf InRect(x, y,  470, 30, 570, 47) then 

Call DescribeLink("An Internet tutorial")

ElseIf InRect(x, y,  470, 70, 570, 87) then 

Call DescribeLink("Use these search services to 


find anything on the Internet")

ElseIf InRect(x, y,  470, 105, 570, 122) then 

Call DescribeLink("We've put helpful and handy 


web resources at your fingertips")

ElseIf InRect(x, y,  470, 140, 570, 157) then 

Call DescribeLink("Take a look at this week's 


picks")

ElseIf InRect(x, y,  470, 175, 570, 192) then 

Call DescribeLink("About the Microsoft Network")


Else 

DescribeLink ""

End If

End sub


Else 


' Remember the last location clicked.


Sub Image_MouseMove(s, b, x, y)

mX = x

mY = y

If InRect(x, y,  5, 30, 120, 85) Then 

Call DescribeLink("The Microsoft Product 


Catalog")


ElseIf InRect(x, y,  5, 95, 120, 135) then 

Call DescribeLink("Microsoft's product support 


options")


ElseIf InRect(x, y,  5, 150, 120, 190) then 

Call DescribeLink("Download free Microsoft 


software")

ElseIf InRect(x, y,  470, 30, 570, 47) then 

Call DescribeLink("An Internet tutorial")

ElseIf InRect(x, y,  470, 70, 570, 87) then 

Call DescribeLink("Use these search services to 


find anything on the Internet")

ElseIf InRect(x, y,  470, 105, 570, 122) then 

Call DescribeLink("We've put helpful and handy 


web resources at your fingertips")

ElseIf InRect(x, y,  470, 140, 570, 157) then 

Call DescribeLink("Take a look at this week's 


picks")

ElseIf InRect(x, y,  470, 175, 570, 192) then 

Call DescribeLink("About the Microsoft Network")


Else 

DescribeLink ""

End If

End Sub



End If



Sub Image_OnClick()

If InRect(mX, mY,  5, 30, 120, 85) Then 

location.Href = 


"https://web.archive.org/web/20010616083652/http://www.microsoft.com/products/


default.asp"

ElseIf InRect(mX, mY,  5, 95, 120, 135) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.microsoft.com/support/"

ElseIf InRect(mX, mY,  5, 150, 120, 190) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.microsoft.com/products/


default.asp"

ElseIf InRect(mX, mY,  470, 30, 570, 47) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.msn.com/tutorial/default.


html"

ElseIf InRect(mX, mY,  470, 70, 570, 87) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.all4one.com"

ElseIf InRect(mX, mY,  470, 105, 570, 122) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.msn.com/"

ElseIf InRect(mX, mY,  470, 140, 570, 157) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.msn.com/"

ElseIf InRect(mX, mY,  470, 175, 570, 192) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.msn.com/"

End If

End Sub


Function InRect(x, y, Rect_x1, Rect_y1, Rect_x2, Rect_y2)

InRect =  x > Rect_x1 And x < Rect_x2 And y > Rect_y1 And y 


< Rect_y2

End Function

Sub DescribeLink(Text)

TxtLinkDescription.Value = Text

End Sub

-->

</script>


<p>

<font size="2">

A brief <a 


href="/web/20010616083652/http://msdn.microsoft.com/scripting/vbscript/samples/


mouset/explain.htm">explanation</a> is available.  

If this sample doesn't work, download <a 


href="/web/20010616083652/http://msdn.microsoft.com/isapi/gomscom.asp?


Target=/ie/">Internet Explorer 5.0</a> now.<p>


</font>



<br><p>

<font face="verdana, arial, helvetica" size="1" align="RIGHT" color="#808080">

<i>Last updated: <!--$$JustDate:-->  1/04/00 <!-- $--></i>

</font></p>

===============================