Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > sending JavaScript code from server control to client ???

Reply
Thread Tools

sending JavaScript code from server control to client ???

 
 
Oney
Guest
Posts: n/a
 
      05-12-2004
How can I send a javascript code from an asp server control to client
and run that script on client
for example;
when an asp server button clicked, an alert javascript must be sent to
client and run on the client
how can I do that?

please send an example if possible,

thank you very much!
 
Reply With Quote
 
 
 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      05-12-2004
Response.Write()

If you have something like that though this will not execute until the page
is completly renedered to the client. There is no way to "pause and wait"
for something from the client, WWW is not designed this way.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


"Oney" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> How can I send a javascript code from an asp server control to client
> and run that script on client
> for example;
> when an asp server button clicked, an alert javascript must be sent to
> client and run on the client
> how can I do that?
>
> please send an example if possible,
>
> thank you very much!



 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      05-12-2004
string s = "<script type=\"text/javascript\">alert(\"This is an
alert!\");</script>";
if (!(Page.IsStartupScriptRegistered("AlertScript")))
Page.RegisterStartupScript("AlertScript", s);

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Oney" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> How can I send a javascript code from an asp server control to client
> and run that script on client
> for example;
> when an asp server button clicked, an alert javascript must be sent to
> client and run on the client
> how can I do that?
>
> please send an example if possible,
>
> thank you very much!



 
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
problem sending mail: Sending the email to the following server failed Luke Java 2 03-15-2007 10:54 AM
pls help me when i sent mail, it vil sending twice instead of once ,am using java.mail,am sending my code.... shailajabtech@gmail.com Java 0 09-28-2006 06:38 AM
server side code access the text of <asp:label> changed by client-side javascript code? nick ASP .Net 3 12-15-2004 06:26 PM
Sending values from server side to Client side javascript Renuka Javascript 1 11-13-2003 08:52 PM
HTML Client Control versus. HTML Server Control versus. Web Server Control Matthew Louden ASP .Net 1 10-11-2003 07:09 PM



Advertisments