why does this work :-
<HEAD>
......
<SCRIPT LANGUAGE="javascript">
function test()
{
alert("test 1")
}
</SCRIPT>
.....
</HEAD>
<BODY>
....
<A HREF="javascript:test">test</A>
......
</BODY>
but this does not :-
<HEAD>
......
<SCRIPT LANGUAGE="vbscript">
function test()
msgbox("VB Test")
end function
</SCRIPT>
......
</HEAD>
......
<BODY>
....
<A HREF="vbscript:test">test</A>
....
</BODY>
As you can see the only real difference is I have changed JavaScript
to be vbscript and this is the problem. I don't even get a script
error reported by IE6 when I try to run the VB version. I tried
varying vbscript eg vb, vbs but nothing happens.
Why can I not run my vb function just like I can Javascript. It
defies logic (or at least mine!! which says a simple name change
should not cause this problem)
What I am trying to achieve is to run my actual code as a client side
script - with NO postback. I have managed to run some JavaScript
without causing a post back using the <A>...</A> and I can run my vb
actual code from a <ASP:BUTTON> but this causes a postback. I want
to use vb/vbscript as I am familiar with vb and want to get my pages
working asap.
One very frusttrated newbie (to ASP.NET / VB.NET)
Duncan