|
|
|
The Popup Menu control is used to create a popup menu when the user clicks a link, named control or image link with the mouse on a Web page. This control is used mostly for navigational purposes. If you have a lot of links on a Web page that contains other important data, you can place those links in a popup. The Popup Menu control can be taken from the Microsoft Web site by the following address: The Popup Menu control has only one property, ItemCount. The ItemCount property is set to the number of items in the menu. The Menuitem[] parameter tag is used to label the individual items on the page. You can then use a script to call the URL of the page that you want to navigate to. There are five methods associated with the Popup Menu control:
The example of using Popup Menu Control is given below. <OBJECT ID="PopUp1" WIDTH=50 HEIGHT=50 CLASSID="CLSID:7823A620-9DD9-11CF-A662-00AA00C066D2"> <PARAM NAME="MenuItem[0]" VALUE="VBScript"> <PARAM NAME="MenuItem[1]" VALUE="JavaScript"> <PARAM NAME="MenuItem[2]" VALUE="Perl"> </OBJECT> The one event for the Popup Menu control is Click (item). The index of the item clicked is passed to the event. Internet Explorer 5.5 supports this functionality natively with the createPopup() method of the window object. Using its functonality, you can write the similar popup menu in the following way: <body onClick="popOpen()"> <p><script language="VBScript"><! Set Popup=window.createPopup() set popupBody=Popup.document.body popupBody.style.backgroundColor="blue" Popup.document.body.style.color="yellow" Popupbody.style.border="#000065 1px solid" Popupbody.innerHTML="VBScript<br>JavaScript<br>Perl" sub popOpen() Popup.show window.parent.screen.width/2,window.parent.screen.height/2,100,70 end sub </script> </p> Go To Page: 1
The copyright of the article Popup Menu in VB Script is owned by . Permission to republish Popup Menu in print or online must be granted by the author in writing.
|
|
|
|
|
|
|
|