Correct usage of vbScript MsgBox

emmanuuel pascal Source

I require to display some text in browser with some words in between as links. On click of the links I want display pop up with just some text and OK button. I want title of Pop up to be changeable via code and also icon to be information icon. I use JavaScript alert box which always have heading of pop up as "Message from web page". I think it can done using vbScript. Can someone help with correct usage of vbScript. PFB the sample using JavaScript, I need this to be tweaked so that vbScript is used and MsgBox is used.

<html>
<head>
<script type="text/javascript">
fucntion(test){
alert(test)
}
</script>
</head>
<body>
This is my <a href="javascript:void(o)" onclick="test('This is test')">link</a> which     
you can click on for definition.
</body>   
</html>
vbscript

Answers

answered 6 years ago emmanuuel pascal #1

This works fine. 64 is for information icon and Ok button. But I not able to get rid of "vbscript:" which present at the start of the title. Not sure why it is like that.

<html>
<head>
<script type="text/vbscript">
Function myPopUp(test)
    MsgBox test, 64, "My Custom Title"
End Function
</script>
</head>
<body>
This is my <a href="#" language="vbscript" onclick="myPopUp('How are you do
today')">link</a> which     
you can click on for definition.
</body>   
</html>

comments powered by Disqus