How to call Jscript or VBscript function in sub ?

  • Thread starter Thread starter THY
  • Start date Start date
T

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
 
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.
 
not that clear about Page.RegisterStartupScript ... do you have any short
example for this ?
 
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
 
Back
Top