Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to call javascript from asp .net c# script ?

Reply
Thread Tools

how to call javascript from asp .net c# script ?

 
 
lee
Guest
Posts: n/a
 
      08-05-2003
If a certain criteria happens with some data how do I show a
javascript message box to notify the user ?

I don't think I can use a validator control as it's not applicable.


<SCRIPT LANGUAGE="JavaScript">
function onClickJS()
{
window.confirm("data malformed");
}
</SCRIPT>


Thanks,
Hobnob.
 
Reply With Quote
 
 
 
 
S. Justin Gengo
Guest
Posts: n/a
 
      08-05-2003
Lee,

You may want to make the Body tag into a server control and attach the
javascript to that.

I have some sample code on my website, www.aboutfortunate.com, which will
show you how to do so. It's in VB, but it's very simple. You should be able
to port it over without a problem, but if you have questions feel free to
email me. Just search the code library on the site for: "use the body tag as
a server control" or something similar to that and it should pop up as the
first hit.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"lee" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> If a certain criteria happens with some data how do I show a
> javascript message box to notify the user ?
>
> I don't think I can use a validator control as it's not applicable.
>
>
> <SCRIPT LANGUAGE="JavaScript">
> function onClickJS()
> {
> window.confirm("data malformed");
> }
> </SCRIPT>
>
>
> Thanks,
> Hobnob.



 
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 to execute a script from another script and other script does notdo busy wait. Rajat Python 3 01-08-2010 02:05 PM
an ugly method to call an ASP script from C#/ASP.NET pages I like to party ASP .Net 10 09-17-2009 05:58 AM
Call script which accepts com. line par. from another script anderror control Karim Ali Python 1 05-24-2007 12:21 AM
Call external file with <script src="content.js"></script> insteadof SSI. BlueŽ Javascript 10 05-27-2005 08:45 PM
How to make Perl Script "POST" call from another Perl Script??? Wet Basement Perl 1 07-15-2003 10:25 PM



Advertisments