Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Calling Javascript Function from within VB Procedure?

Reply
Thread Tools

Calling Javascript Function from within VB Procedure?

 
 
Martin
Guest
Posts: n/a
 
      03-01-2004
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?U3VyZXNo?=
Guest
Posts: n/a
 
      03-01-2004
Use Page.RegisterClientScriptBlock("", "your javascript code as string") method

Visit the following link for details on RegisterClientScriptBlock method
http://msdn.microsoft.com/library/de...tBlockTopic.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(
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I include a server tag within a javascript parameter which is itself within a HTML element event? mark4asp ASP .Net 2 11-07-2006 06:23 AM
write a function such that when ever i call this function in some other function .it should give me tha data type and value of calling function parameter komal C++ 6 01-25-2005 11:13 AM
calling virtual function results in calling function of base class... Andreas Lagemann C++ 8 01-10-2005 11:03 PM
calling virtual function results in calling function of base class ... tiwy C++ 0 01-09-2005 11:17 PM
calling javascript function within <TABLE> tags Markusek Peter ASP .Net 1 02-09-2004 02:35 PM



Advertisments