Calling Javascript Function from within VB Procedure?

M

Martin

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
 
G

Guest

Use Page.RegisterClientScriptBlock("", "your javascript code as string") method

Visit the following link for details on RegisterClientScriptBlock method
http://msdn.microsoft.com/library/d...bUIPageClassRegisterClientScriptBlockTopic.as

Suresh


----- Martin wrote: ----

Dear Grou

I'm using VB to write an aspnet application. I would like to call
javascript function from within a VB Sub or VB Function, is i
possible? My code is something like this

VB Code
Public Sub VBProcedure(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top