Hi Cor
Thanks for your message.
Well, I'm not exactly sure whether that's the answer to my problem. After
having had a look at the RegisterScript Methods, it seems to me that it is
just a convenient way to inject the Javascript into the page. I can do this
by writing it directly in the HTML view in VS. Or is there a difference.
Once having the Javsscript registered, I still need a HTML button on my page
whick calls the Javascript in the OnClick Event.
However in my case, I'm calling a VB Sub with the OnItemCommand Event of the
Datagrid to look up some data depending on the value choosen nin the
datagrid. So the OnItemCommand for the datagrid is already taken. At the
same time when the OnItemCommand Event fires I also would like to execute a
client-side Javascript function after the data has been looked up.
So I thought I'm calling the Javascript from within the VB Sub in which I
look up the data after completion of look-up.
Any possible way to achive this?
Thanks for your help & efforts!
Kind Regards,
Martin
"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:c1**********@sparta.btinternet.com...
Dear Group
I'm using VB to write an aspnet application. I would like to call a
javascript function from within a VB Sub or VB Function, is it possible?
My code is something like this:
VB Code:
Public Sub VBProcedure()
.
.
Run some VB Code...
.
.
Now call the javascript function
End Sub
------------------------------------------------------
javascript:
<HEAD>
<script language=javascript>
<!--
// MyFunction
function myfunction() {
window.open()
}
//-->
</script>
</HEAD>
I tried javascript: myfunction() within the VB procedure. Well, it was
just a blind guess since the 'javascript:' syntax did not produce any errors.
What is 'javascript:' all about? I can't find it documented.
Thanks for your help & efforts!
Martin