...

View Full Version : combining javascript with VB.. ??? can I



chris_angell
08-23-2002, 12:22 PM
I am wondering if I can then call my javascript from the VB code.. i AM NOT TO SURE iF i AM IN THE RIGHT FORUM... BUT HERE IS THE CODE i AM TRYING.........

<html>

<head>
<script type="text/javascript" language="JavaScript">
function pleaseyes() {
alert("yes");
}
</script>
<script type="text/javascript" language="JavaScript">
function pleasenono() {
alert("no");
}
</script>
<script language="VBscript">
Sub entrance_onClick
returnvalue=MsgBox ("You are about a DHTML intensive site. Proceed?",52,"Greetings!")
If returnvalue=6 Then
window.location="pleaseyes()"
Else
window.location="pleaseno()"
End If
End Sub
</script>
</head>
<body>
<form>
<input type="button" name="entrance" value="Click here">
</form>
</body>

</html>

aNY IDEAS :)

ShdwStal
08-23-2002, 02:10 PM
does window.location work in VBScript?

brothercake
08-23-2002, 03:17 PM
you can do something like this

<a href="#" language="VBScript" onclick="CallMyVBFunction()">click</a>

<a href="#" language="JavaScript" onclick="callMyJSFunction()">click</a>

chris_angell
08-23-2002, 04:34 PM
works well



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum