When I click on a Hyperlink how can I get it to run some VB script first?
I know it must have something to do with OnClick, but not sure how to call the function
Printable View
When I click on a Hyperlink how can I get it to run some VB script first?
I know it must have something to do with OnClick, but not sure how to call the function
Is this what you want?
Code:
<html>
<head>
<script language=Javascript>
function x(){
alert("hfgpiusargpufnpg");
}
</script>
</head>
<body>
<A href="page2.html" onClick="x()">page2</a>
</body>
</html>
Thanks but would it be the same for VBScript?
<html>
<head>
<script language=vbscript>
function x()
'do something
end function
</script>
</head>
<body>
<A href="page2.html" onClick="x()">page2</a>
</body>
</html>
Yep!
... but I prefer to use javascript in the browser rather than vbscript