473,414 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

How to call Jscript or VBscript function in sub ?

THY
Hi,

I need to know how can I call JavaScript or VBscript function from a sub ...
so I can display a pop-up when a sub is executed ...

thanks
Nov 17 '05 #1
4 1691
You can't display a client-side popup when a server-side Sub is executed.
However, you CAN add a client-side script to the page which will execute
when the page reaches the browser. Use Page.RegisterStartupScript to do it.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
The more I learn, the less I know.

"THY" <th*@streamyx.com> wrote in message
news:Oi**************@TK2MSFTNGP09.phx.gbl...
Hi,

I need to know how can I call JavaScript or VBscript function from a sub .... so I can display a pop-up when a sub is executed ...

thanks

Nov 17 '05 #2
THY
not that clear about Page.RegisterStartupScript ... do you have any short
example for this ?

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uq*************@TK2MSFTNGP12.phx.gbl...
You can't display a client-side popup when a server-side Sub is executed.
However, you CAN add a client-side script to the page which will execute
when the page reaches the browser. Use Page.RegisterStartupScript to do it.
--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
The more I learn, the less I know.

"THY" <th*@streamyx.com> wrote in message
news:Oi**************@TK2MSFTNGP09.phx.gbl...
Hi,

I need to know how can I call JavaScript or VBscript function from a sub

...
so I can display a pop-up when a sub is executed ...

thanks


Nov 17 '05 #3
THY,

I have an example that is similar on my website, www.aboutfortunate.com. You
can make the <body> tag of the page into a server control and then add the
popup code to that. You can find the example easily by going to the code
library on the site and searching for: "body tag as server control" or
something similar.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"THY" <th*@streamyx.com> wrote in message
news:%2*****************@TK2MSFTNGP10.phx.gbl...
not that clear about Page.RegisterStartupScript ... do you have any short
example for this ?

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uq*************@TK2MSFTNGP12.phx.gbl...
You can't display a client-side popup when a server-side Sub is executed. However, you CAN add a client-side script to the page which will execute
when the page reaches the browser. Use Page.RegisterStartupScript to do

it.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
The more I learn, the less I know.

"THY" <th*@streamyx.com> wrote in message
news:Oi**************@TK2MSFTNGP09.phx.gbl...
Hi,

I need to know how can I call JavaScript or VBscript function from a
sub ...
so I can display a pop-up when a sub is executed ...

thanks



Nov 17 '05 #4
THY,

I have an example that is similar on my website, www.aboutfortunate.com. You
can make the <body> tag of the page into a server control and then add the
popup code to that. You can find the example easily by going to the code
library on the site and searching for: "body tag as server control" or
something similar.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"THY" <th*@streamyx.com> wrote in message
news:%2*****************@TK2MSFTNGP10.phx.gbl...
not that clear about Page.RegisterStartupScript ... do you have any short
example for this ?

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uq*************@TK2MSFTNGP12.phx.gbl...
You can't display a client-side popup when a server-side Sub is executed. However, you CAN add a client-side script to the page which will execute
when the page reaches the browser. Use Page.RegisterStartupScript to do

it.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
The more I learn, the less I know.

"THY" <th*@streamyx.com> wrote in message
news:Oi**************@TK2MSFTNGP09.phx.gbl...
Hi,

I need to know how can I call JavaScript or VBscript function from a
sub ...
so I can display a pop-up when a sub is executed ...

thanks



Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: Christopher Brandsdal | last post by:
If I have a .ASP page that runs JScript code - is it possible to include an ..ASP page that runs VBscript???
20
by: Harag | last post by:
Hi All. I'm stating out doing some web developing. I was wondering which of the server side languages should I concentrate on and learn. I Know CSS, HTML, T-SQL I can look at the client...
4
by: Harag | last post by:
Hi All I currently thinking of converting from my little knowledge of VBscript to jScript ASP. With this in mind I'm looking at my current code to see how it will convert over to Jscript. ...
15
by: Laser Lu | last post by:
In ASP and CGI, which one would be executed more fast and has the better execution efficiency in IIS? And how about writing CGI in VB? -- Best regards, Laser Lu
5
by: W. Jack | last post by:
Hello, in VBScript: Int(11.4)=11 What function in JScript like this function? Thank you
10
by: Christopher Brandsdal | last post by:
I have this string: /sites/binaer/demo/fil/Winnie-the-Pooh 1024x768.jpg If I wanted to cut everything before Winnie-the-Pooh 1024x768.jpg, how would I do this? In VBScript I could find the...
15
by: chirs | last post by:
I am trying to understand a piece of code. In a javascrpit file, there is a function: function ItemStyle(){ var names=; addProps(this,arguments,names,true); }; In the html file, it calls...
3
by: JoeK | last post by:
Hey all, I am automating a web page from Visual Foxpro. I can control all the textboxes, radio buttons, and command buttons using syntax such as: ...
2
by: tunk | last post by:
I dont know where to start my question so let me tell you my story :) The ASP that cause me trouble is running on IIS that set ASP default language to JScript instead of VBScript. This ASP page...
1
by: Andrew Wan | last post by:
How can VBScript code access JScript code variables in the same ASP page? <SCRIPT LANGAUGE="VBScript"> Dim a a = 10 </SCRIPT> <SCRIPT LANGUAGE="JScript"> Response.Write(a); </SCRIPT>
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.